- json_last_error_msg: documentation ( source)
- json_last_error: documentation ( source)
- json_encode: documentation ( source)
<?php
$array = [1, [2, 3]];
$array[1][1] = &$array;
json_encode($array);
echo json_last_error_msg() . ', ' . json_last_error ();