Re: GOTO operator

From: Date: Wed, 04 Aug 2004 00:22:00 +0000
Subject: Re: GOTO operator
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-11886@lists.php.net to get a copy of this message
I'm +1 on goto with static labels. regardless of whether it ends up in PHP or not I think Sara deserves a gold star alone for the large number of very value info/explainations she continues to post here. If I had to name one person off the list from whose posts I had gained more insight & knowledge regarding programming in general and PHP in particular, Sara would it. case in point: I now have a firm grasp of the term 'bork'! ;-) in short: nice one :-) Sara Golemon wrote:
Out of curiosity, I wonder which other features would similarly not work
when
eval()'ed...???
Anything involving unbalanced braces would bork: eval('if ($a > 5) {'); do_stuff(); } As would any looping initializer like this: eval('foreach($foo as $bar)'); do_itteration($bar); While I havn't tested it, I can't imagine this working: switch ($foo) { eval('case "bar": do_bar(); break;'); case 'baz':
    do_baz();
    break;
default:
    do_default();
} -Sara


« previous php.internals (#11886) next »