Rasmus Lerdorf wrote:
Yeah, I didn't mean to suggest that actually. I just meant that most PHP developers use the get/post distinction due to the PHP variables, as they are likely more influenced by that than by outside resources such as RFCs, etc. Most communities tend to embrace the syntactical properties of their language of choice. In this case, even though the use of "get variables" and "post variables" came before $HTTP_GETS_VARS or the more recent $_GET, your naming decisions have basically shaped this community's perspective.ColdFusion developers are more familiar with the URL/form distinction
than the get/post one, as the former are variable scopes. PHP developers
generally use the get/post distinction due to the arrays $_GET and
$_POST. As I understand it, mod_perl developers do not distinguish the
two, though I have only heard this from one source (though he is a
highly respected member of the mod_perl community). I am less certain
about other communities.
Not that it matters, but the Get/Post/Cookie naming in PHP predates the existence of the various $_GET or $HTTP_GET_VARS variables by quite a bit. It was the naming that spawned the variable names, not the other way around.
I prefer PHP's naming convention, but then I cannot claim to be impartial. :-) The use of get/post comes directly from the form tag you mention (you mean HTML spec though, right?), and I think this is much more intuitive to developers. The example I gave of a form with method="get" and a link yielding equivalent HTTP requests is hidden from developers, so the similarity is not the least bit intuitive.I didn't make up these names. They are right out of the HTTP spec. ie. <form action=... method=GET/POST> It seemed obvious and natural to follow this convention in PHP.
Yeah, that perfectly illustrates the arguments that each group uses to defend their stance. The URL/form people often cite the fact that URL variables can be present in a POST request, so why call them get variables? The get/post people (us) think it is even more confusing to call post variables form variables, since form variables (which we tend to consider any variables submitted in an HTML form) can be get variables.But yes, the fact that you can have GET variables on a POST request is perhaps somewhat confusing and perhaps the reason why other communities have labelled this data as URL variables. However, I think it is very confusing to call POST variables "form" variables as you can very easily have GET-method forms in which case this "form" data now comes in a URL variable.
Anyway, thanks for your insight. Some of these slightly off-topic issues are more interesting than the on-topic ones. :-) Maybe our community needs a historian to collect some of this information for those of us who are interested (or am I the only one?).
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php