summaryrefslogtreecommitdiff
path: root/ext/json/tests/003.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/tests/003.phpt')
-rw-r--r--ext/json/tests/003.phpt11
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/json/tests/003.phpt b/ext/json/tests/003.phpt
index 3b52fb0884..ab63711008 100644
--- a/ext/json/tests/003.phpt
+++ b/ext/json/tests/003.phpt
@@ -9,10 +9,12 @@ $a = array();
$a[] = &$a;
var_dump($a);
+
var_dump(json_encode($a));
+var_dump(json_last_error());
-/* Break circular data structure to prevent memory leaks */
-unset($a[0]);
+var_dump(json_encode($a, JSON_PARTIAL_OUTPUT_ON_ERROR));
+var_dump(json_last_error());
echo "Done\n";
?>
@@ -26,5 +28,10 @@ array(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(8) "[[null]]"
+int(6)
Done