I was wondering if it would be worthwhile to consider
replacing the functionality of a 'goto' statement with
two or maybe three statements.
'break_to' 'advance_to' and maybe even 'change_state_to'
while($foo1) as LABEL1 {
....
while($foo2) {
...
if($var1)
break;
if($var2)
break_to LABEL1;
...
if($var3)
advance_to LABEL2;
...
..
}
LABEL2:
'break_to' might make it easier for someone who
has to review/maintain the code to spot it as
a 'goto' replacement to break out of a nested loop.
'advance_to' would hopefully cut down on the number
of bug reports claiming that 'jump' doesn't work
properly (when trying to go backwards)
Regards,
Tim Gales
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php