3v4l.org

run code in 300+ PHP versions simultaneously
<?php $transport = array('foot', 'bike', 'car', 'plane'); $i=0 while (list(, $val)=each($transport)) { print $val; if($i==0) {$transport[]='merce';$i=1;} }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'while' (T_WHILE) in /in/26YBP on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_WHILE in /in/26YBP on line 5
Process exited with code 255.

preferences:
193.58 ms | 1386 KiB | 67 Q