3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [123]; unset($array[0]); function changeScope($array){ if($array === []){ // then $array[] = "x"; // will result in assert([0 => "x"] === $array); } } changeScope($array);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
158.93 ms | 2557 KiB | 12 Q