On Tue, 2014-10-14 at 14:29 +0100, Andrea Faulds wrote:
> * $_BODY    - request body parameters

I think this name is confusing and unclear. I don't have an alternative,
though. (Only suggestion: stick with the established name which can be
taught easily ("See method attribute in HTML <form> tag"), slightly
advanced users are used to it and don't really care, even more advanced
users use some framework/library providing higher level abstraction and
not having to care anymore, this leaves a few experts who know HTTP and
don't use a framework ... :-) )

And about the cost - mind that there always is an additional cost to any
change: Adoption to the environment. i.e. I assume there are multiple
people who scan for $_GET/$_POST/$_REQUEST/$_COOKIES/$_SERVER to find
input data while analyzing foreign code. Habits and tools need to
change.

Also when adding those the question is whether they should be true
aliases or not, i.e. what the result of

   $_GET['foo'] = 23;
   echo $_NEW_GET['foo'];

is.

For the latter I think any way is fine. And if we have good names I'm
open to add them, I don't consider $_BODY good, though. It has to be
short ($_HTTP_REQUEST_BODY certainly is too long) and precise, else
people stick with the comfortable thing taught in every book/tutorial.

johannes
 


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to