Re: PHP 5.1
| From: | Sascha Schumann | Date: | Tue, 07 Jun 2005 12:46:24 +0000 |
| Subject: | Re: PHP 5.1 | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16511@lists.php.net to get a copy of this message | ||
As for my own example, many state machines make extensive use of goto to avoid recursive calls.
Goto is not required for that. State machines such as the
following
state1:
...
goto state99;
state99:
...
goto state2;
done:
can easily be rewritten as
while (!end_condition) {
switch (state) {
case 1:
state = 99;
break;
case 99:
state = 2;
break;
}
}
- Sascha