1 Aug 2004 02:44
Re: [PHP-DEV] GOTO operator
Sara Golemon <pollita <at> php.net>
2004-08-01 00:44:07 GMT
2004-08-01 00:44:07 GMT
> 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
--
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
(Continue reading)
RSS Feed