Journal Chacham's Journal: PHP website removed my comment. 3
Google's cache. The real page
PHP has register_globals. Because many do not know how to code, they reluctantly turned off this wonderful idea by default. Many comments agreed that it should be off. They just don't know how to code. So, i commented,
I disagree. register_globals is wonderful. It doesn't produce bad code, bad coders produce bad code!
When on a page, it usually does not matter where the data came from. If it does, simply refer to it by it's full address, including the array that stores it. That is, if the session defines a default that cannot be overridden, simply refer to it as $_SESSION["Variable"], and it cannot be overridden.
Conversely, if register_globals is off, getting variables can be a hassle. For example, say a form POSTs data to a page, but you want to let the user pass it as a GET manually, should they so wish. Turning register_globals means that the page needs to be go through each array to set another variable that holds the default. This gets especially confusing when they conflict with a session or the like, where some stored values are not to be changed, and others are meant to be mere defaults.
The comment has been removed. Even if they disagree, censorship is a bad thing. Oh well.
PHP is pretty horribly designed anyway, and has little consistency. For example, in the variable functions some start off with "is" such as "isset()", others do not, such as "empty", which should be "IsEmpty". Then, they sometimes have underscored between words, such as "get_resource_type" and other time do not, such as "gettype".
Nonsense... (Score:2, Insightful)
Individuals have the right to silence you in their realms. If you don't like it, creat
profanity (Score:2)
I agree about PHP (and an observation) (Score:2)
And the observation -- it seems everyone who has comm