Any valid use of goto in PHP?

Posted by nikic on Stack Overflow See other posts from Stack Overflow or by nikic
Published on 2011-01-30T15:00:51Z Indexed on 2011/01/30 15:25 UTC
Read the original article Hit count: 182

Filed under:
|

I know, there are other questions about the goto statement introduced in PHP 5.3.

But I couldn't find any decent answer in there, all were of the type "last resort", "xkcd", "evil", "bad", "EVIL!!!". But no valid example. Only statements that there aren't any uses. Or statements that there are some rare use cases (again, without examples).

So, the question is: "Which are the valid uses of goto in PHP". Answers for "Is goto evil" are not welcome and will get downvoted. Thanks :)

Or does somebody have a link to an RFC where the decision is explained - I couldn't find one.

© Stack Overflow or respective owner

Related posts about php

Related posts about goto