@bwoebi Return types aren't related to the change. I created another function instead, so no code that's used for return type checking is used anymore.
@RachelDockter there are multiple differences, but the one that would be inportant to you would be: data sent using POST requests can be secured against interception
yeh so lets say its a site like facebook, i search for a person, the php gets the name using the post request, looks up the searched name in a database, and then sends their full profile details to a html file to display them
say u wanted to display that information, would u make everything in the same php file? or can u make a new html file which recieves that peice of info to display it
@RachelDockter I would actually use two files - one for showing the form and other to handle the data, but ion the second file I would put a "redirect" at the bottom
you can redirect from one page to another using header('Location: /some/url');
few days ago I started to changing my mind from standard php to OOP PHP with my MVC structure + Eloquent for DB-s. I want to write correctly from begin so I will be greatful if you will show me where I can make my code better. Rooting is good. I made it with YT tutorial. Next I made roots like th...
just because our bundled extensions were introduced before the use of namespaces became ubiquitous (or even before they existed at all), does not mean we need to perpetuate that
I see no benefit in namespacing that. It's all functions which makes no sense to import them (importing them will make it less obvious that it's the libsodium primitives we're using).
@bwoebi You can import the top-level namespace ... yay for no namespace fallback
Though for the record, I consider the idea of deciding whether I namespace my next library based on whether importing will be "useful" to be ridiculous
To me it's shorter function/class names within a namespace as well as removing vendor prefixes where helpful (And I'd argue that removing the "sodium_" or "\Sodium\" prefix would be counter productive.)
@bwoebi While the while (1) yield; at the end of the generator parsers? I would think asking the parser for more data after an error would be a mistake you'd want to catch.
@Trowski it doesn't need to be a while(1), but there should be a yield at least. At least for the websocket parser it always yields the number of frames parsed
@Edenwave it's not bad editing. your question is too broad. there are actually three statements, that are more like "do you think this is okay"
this tends to get downvoted. Try having one, clear, problem statement, with error messages if possible (I'll admit in this case this seems that it was related to markdown being retarded)
read tutorials? type these questions on google. ask here in chat, like you have done, but with a format that facilitates reasoning about the general principles of MVC and OOP, not just your specific problem
google for php session management, to learn about session management
the 8. point in your question is invariably going to differ from person to person, there's not dodging it, you'll have to learn about design, architecture, and make a decision you'll regret in six months
@kelunik there isn't one specifically for RxPHP. All of the RxJS concepts carry over, so those tutorials apply for the most part. I'll see if I can write something for RxPHP in the next couple of days
hi everyone I have a profile page that pulls all the data properly the only issue is i cannot get it to keep the users gallery images in there profile.. or the images will only show one image
I have a profile page that has 2 database tables, table1.users and table2.images
table1.users has id, email, full_name
and
table2.images has image_id, id, picture_image
this is not a page that requires sessions or login
my problem is that the user can upload images to their profile f...
@Codi I'd strongly recommend re-writing you question until it is focused on the exact thing you are having a problem with, rather than including both HTML and an sql query in a single question. Maybe sscce.org would guide you on how to rephrase it.
hey guys can any one tell me how can i use isset or empty functions like this $var = 'isset'; $var($form['user']) it gives me error call to undefined function isset
@bwoebi @Trowski Instead of printing the exception thing to STDERR, we could also just throw the exception from a register_shutdown_function for the Promise\ErrorHandler: 3v4l.org/BQeEC
@Trowski maybe you can help me, can i ensure that N methods from 2+ different mocks are called in the order i define? i want do do: mock A's foo() will be called, then mock B's bar() will be called, then mock A's foo() will be called again, in this order
@NikiC just to clarify one thing, is it actually a cycle? The pixel iterator object in PHP, isn't currently aware of the pixel objects, so there's only a single direction of references, rather than a cycle, right?
No, another example... 18 (00010010) << 4 = 144 (10010000)
err, I meant << 3
18 << 3 = 144
I do have a question of my own though, I'm working with a project called aurweb (git.archlinux.org/aurweb.git) and we can run php -S to test things and we're curious how it knows to rewrite /index.php/xxx to /xxx?
@Exception It's... tricky when you are used to high-level languages. Is there are particular reason you are asking about this other than curiosity? i.e. do you have a use case or are you just trying to learn a new thing?
@NikiC The project uses urls that nginx rewrites /index.php/xxx to /xxx, so it uses PATH_INFO to route the pages. For some reason, with php -S, it seems to do this without configuration and is confusing me.