what happens when I want to place a 'goto' label just before a while or foreach
loop (upon which I haven't put a label)? I ask because I assume that the following 2
statements should be identical no:?
<?php
LABEL: while(1) {
/* ..etc */
?>
<?php
LABEL:
while(1) {
/* ..etc */
?>
PHP's parser gives no importance to whitespace, so yes, these two are identical.
In the dual-purpose vision I had for these labels, all labels would be usable as GOTO targets. Labels which are followed *immediately* by a break container construct (for, foreach, while, do-while, switch) would also be usable as break/continue targets.
Note that in these example, goto LABEL; and continue lABEL; are *not* the same statement. Goto would restart state loops such as for() and foreach() from initial positions.
-Sara