3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1, [2, 3]]; $array[1][1] = &$array; json_encode($array); echo json_last_error_msg() . ', ' . json_last_error ();

preferences:
66.41 ms | 406 KiB | 5 Q