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 ();
based on m4vuk
Output for 7.3.0 - 7.3.26, 7.4.0 - 7.4.14, 8.0.0 - 8.0.3
Recursion detected, 6