View Single Post
08-07-2009, 09:56 PM
Join Date: Sep 2007
goto in php isnt THAT bad, its a construct to ease development, in php its refered as the "jump label operator", but it really is a kind of goto but limited. In PHP you cannot jump inside a loop or to another scope for example. If you don't like it, then fine don't use it, simple as that. Rasmus have some slides and theres various videos with "Whats new in 5.3" by him, where he greatly explains it, what it is, what its not etc.
However goto is useful in some cases, for example when writing complex parsers, like the Engine which basiclly is a skeleton filled with rules thats turned into a complex parser with goto using tools like flex or re2c. So its a useful construct for such generated code for example.
Note to PHP contributers: Lets improve PHP's multi-threading and daemonisation NOT f**king GOTO statements (even if they are improved GOTO statements)!
If you want that improved, then post it to the mailing list, even creating a patch for it or see if others are interested in that feature, or put it on our bug tracker (bugs.php.net, mark it as a "Feature/Change Request"). Take a look at
and subscribe to internals and post a topic and see what others think, theres nothing like breaking the silence and stop complaing about features that may not appeal to you :)
View Public Profile
Send a private message to Kalle
Visit Kalle's homepage!
Find More Posts by Kalle