3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('this', 'is', 'my', 'array'); $bool = false; foreach($array as $value){ do { echo $value.' '; if($value == 'my' && !$bool){ // Rerun the 'my' index again $bool = true; } else { $bool = false; } } while ($bool) }
Output for 5.3.0 - 5.3.26, 5.4.0 - 5.4.16
Parse error: syntax error, unexpected '}', expecting ';' in /in/g2nGv on line 19
Process exited with code 255.

preferences:
186.32 ms | 1395 KiB | 51 Q