I’ve heard rumors that PHP is planning on introducing a ‘goto’ command. What is it supposed to be doing?
I’ve tried searching a bit, but haven’t found anything awfully descriptive. I understand that it won’t be a ‘GOTO 10‘-like command…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They are not adding a real GOTO, but extending the BREAK keyword to use static labels. Basically, it will be enhancing the ability to break out of
switchnested if statements. Here’s the concept example I found:Of course, once the GOTO ‘rumor’ was out, there was nothing to stop some evil guys to propagate an additional COMEFROM joke. Be on your toes.
See also:
http://www.php.net/~derick/meeting-notes.html#adding-goto