Re: GOTO operator
| From: | Sara Golemon | Date: | Sun, 01 Aug 2004 00:44:07 +0000 |
| Subject: | Re: GOTO operator | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11779@lists.php.net to get a copy of this message | ||
> How does the GOTO implementation handle this
> script1.php
> <?php
>
> do_some_stuff();
> include script2.php;
>
> label:
> echo "Hello"
> ?>
>
> script2.php:
> <?php
> declare_some_funcs();
> .... some code ...
> if (some_cond) {
> goto label;
> }
> .... other code....
> ?>
>
Included files are actually separate execution scopes (even though they're
shared data scope). So the implementation referenced originally would raise
an error saing that 'label' is an undefined label.
-Sara