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); }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
162.19 ms | 2763 KiB | 8 Q