Re: GOTO operator
| From: | Sara Golemon | Date: | Tue, 03 Aug 2004 19:18:40 +0000 |
| Subject: | Re: GOTO operator | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11882@lists.php.net to get a copy of this message | ||
> 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