3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($list){ foreach($list as $index1 => $a1){ foreach($list as $index2 => $a2){ if($index2 == 3) unset($list[3]); echo $index1 . " " . $index2 . " - "; } echo "\n"; } echo "\n\n"; } test(new ArrayObject([0,1,2,3,4,5])); test([0,1,2,3,4,5]);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
157.87 ms | 3461 KiB | 12 Q