Slightly OT, but while we are on the subject of switch not being
C-ish, how about making it so that continue inside a switch block
behaves the way it does in C?
This C code snippet:
while (1) {
printf("top\n");
switch (1) {
case 1:
continue;
}
printf("bork\n");
}
will print out "top\n" repeatedly.
The same code in PHP will print out "top\nbork\n" repeatedly.
The get the same behaviour as the C code you need to use continue 2 instead.
IMO, this is awful, and at first I thought it was a BC break, but it
seems that the stock RHEL 4.3.2 version of PHP behaves the same way.
What, if anything, should we do about this?
--Wez.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php