Account

Log in (OpenID enabled)

PHP 5.3 adds goto

Category: Programming   Tags: ,

PHP introduces the goto command in its soon to be released version 5.3.

http://www.php.net/manual/en/control-structures.goto.php

<?php
goto a;
echo 'Foo';
 
a:
echo 'Bar';
?>

It also comes with the warning:

It is not allowed to jump into a loop or switch statement. A fatal error is issued in such cases.

PHP is on track to be the worst widely used language ever.

  • Reddit
  • HackerNews
  • Twitter
  • DZone
  • del.icio.us
  • FriendFeed
  • StumbleUpon
  • RSS

Related posts:

  1. PHP Sucks: No stable sort
  2. Hot code swapping for servers not written in Erlang
  3. Debunking the Erlang and Haskell hype for servers
  4. Why Aren’t Functional Languages like Haskell and Ocaml Popular?
  5. Host Your Own Email: Easy Disposable Addresses

6 Comments  »

  1. ryan says:

    lol @ your last line.

  2. LowEndAdmin says:

    > PHP is on track to be the worst widely used language ever.

    No. With GOTO implemented, it just makes PHP on-par with BASIC :)

  3. emmett says:

    Sweet, I can finally port my all the TI-basic calculator games I wrote in high school to the interwebs.

  4. Sofia22 says:

    I´ll try to install this version of PHP.
    thanks

    __________
    Sofi Hedz
    Grupo Mayan Friends

  5. idk says:

    Why do programmers hate goto again?

    • Bogdan Popa says:

      Because they discovered structured programming in the 60s!…and it can lead to really messy(spagetti) code.
      I don’t really see why people are making such a big deal out of this, though. C’s had the keyword since forever and I don’t see anyone complaining about that. Besides, you don’t have to use the feature if you don’t want to.

RSS feed for comments on this post, TrackBack URI

Leave a Comment

(Cookies must be enabled)