PHP $ _REQUEST Variable

I have a question regarding the global variable $ _REQUEST in php. When you have a receipt and a message sent with the same variable name, does php prioritize any of them? I.e. if I have $ _POST ['var'], as well as $ _GET ['var'] sent to the page, will $ _REQUEST ['var'] contain the message or get, or will it perform a different type of assignment?

Thanks!

+6
source share
2 answers

It depends on the request_order configuration directive (quoting):

This directive describes the order in which PHP registers GET, POST, and Cookie variables in the _REQUEST array.


Also look at variables_order : there are some additional explanations (e.g. letters that can be used), and also affects $_REQUEST .

+7
source

your question is pretty similar to the next post ... check it out ...

Among $ _REQUEST, $ _GET and $ _POST, which is the fastest?

0
source

Source: https://habr.com/ru/post/916004/


All Articles