1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
--TEST-- json_last_error() failures --FILE-- <?php var_dump(json_last_error()); try { var_dump(json_last_error(true)); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } ?> --EXPECT-- int(0) json_last_error() expects exactly 0 arguments, 1 given