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 == 1) unset($list[1]); echo $index1 . " " . $index2 . " - "; } echo "\n"; } echo "\n\n"; } test(new ArrayObject([0,1])); test([0,1]);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
160.75 ms | 3109 KiB | 12 Q