diff options
Diffstat (limited to 'ext/json/tests/004.phpt')
-rw-r--r-- | ext/json/tests/004.phpt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/json/tests/004.phpt b/ext/json/tests/004.phpt index 1d282f9a96..9f9abfe46a 100644 --- a/ext/json/tests/004.phpt +++ b/ext/json/tests/004.phpt @@ -9,7 +9,12 @@ $a = new stdclass; $a->prop = $a; var_dump($a); + var_dump(json_encode($a)); +var_dump(json_last_error()); + +var_dump(json_encode($a, JSON_PARTIAL_OUTPUT_ON_ERROR)); +var_dump(json_last_error()); echo "Done\n"; ?> @@ -20,5 +25,10 @@ object(stdClass)#%d (1) { } Warning: json_encode(): recursion detected in %s on line %d +bool(false) +int(6) + +Warning: json_encode(): recursion detected in %s on line %d string(22) "{"prop":{"prop":null}}" +int(6) Done |