GOTO in PHP 5.3

A while back I was dreaming of GOTO in PHP. Now it’s in PHP 5.3, which is alpha 1 as of last week. GOTO is documented as undocumented.

It might be three years before I can use it but I feel good knowing it’ll be there.

Previous Post
Next Post

5 Comments

  1. _ck_

     /  September 10, 2008

    Ha! Slashdotters and such will have a field day mocking PHP when they find out about that one.

    But it does make me reminiscent for my good old BASIC days :-)

    I guess by “three years” you mean before 5.3 is mainstream. Because it will certainly go gold by the end of this year unless something goes horribly wrong. Really looking forward to it’s speed boost to finally escape PHP4…

  2. Jacob Santos

     /  October 1, 2008

    Well, not really, you can only GOTO a label. If they are mocking PHP, then they really don’t understand why GOTO was horrible practice.

  3. Ian Lewis

     /  July 2, 2009

    Goto in Object oriented PHP5. Insanity.

    I guess the slashdotters will be mocking it because it’s a bad idea that encourages sloppy design.

  4. Joey

     /  August 24, 2009

    There’s enough shocking PHP code out there as it is.
    Half the “PHP is revolutionary” camp is all about OO. Then they go and do this.

  5. eggins10

     /  November 9, 2009

    Apparently when I confronted the dev team years back about making class methods use late binding I was told it was “incorrect” and “bad” OOP …

    Oh but using GOTO is “good” OOP ;-)

Follow

Get every new post delivered to your Inbox.

Join 1,670 other followers

%d bloggers like this: