Possible duplicate:
What is wrong with using $ _REQUEST []?
I understand that PHP sets $ _REQUEST for POST and GET request types. When creating a calm api, I use PUT and DELETE. Instead of creating a new $ PUT or $ DELETE variable to store it, is there any good reason not to use $ _REQUEST? I would think, using the same mechanism, $ _REQUEST, in the whole code would be better, more readable and understandable than using 2 or 3 mechanisms depending on the type of request.
In fact, I mean that answers like "bad practice" don't suit me ... why is this bad practice?
code: parse_str($request->data, $_REQUEST);
I read Overwriting $ _POST for PUT or DELETE requests , but this will overwrite $ _POST with PUT data, which would be wrong for me, since $ _POST describes POST data not PUT data in the variable name. I also read the answer there - create an accessor class. But now this leaves 2 mechanisms for accessing user date, class and $ _REQUEST.
source share