Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
User Journal

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".

This discussion has been archived. No new comments can be posted.

PHP website removed my comment.

Comments Filter:
  • Nonsense... (Score:2, Insightful)

    Censorship is a bad thing, if it is imposed by the government. If you show up at a private gathering I have and start rambling on about something I don't want to hear about, I am well within my rights to have you silenced by removal. You don't have a right to say whatever you want in a non-government setting. Why shouldn't the maintainer of a forum be allowed to censor views he or she doesn't want to put out to the public?

    Individuals have the right to silence you in their realms. If you don't like it, creat

  • perhaps if you cussed more in the comment it would have been left alone.
  • I totally agree with you about PHP's quirks, and I stopped using it long ago because of them. At this point, the language itself needs a major rewrite to fix itself, and that will require essentially new function names for everything and very concrete definitions -- neither seem likely in the PHP universe, and if it does happen, then I'll learn the new (easier) language along with the rest of the PHP programmers in the world and not have missed anything.

    And the observation -- it seems everyone who has comm

"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein

Working...