diff options
Diffstat (limited to 'ext/json/tests/003.phpt')
-rw-r--r-- | ext/json/tests/003.phpt | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/ext/json/tests/003.phpt b/ext/json/tests/003.phpt deleted file mode 100644 index f10baa9d12..0000000000 --- a/ext/json/tests/003.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -json_encode() & endless loop - 1 ---SKIPIF-- -<?php if (!extension_loaded("json")) print "skip"; ?> ---FILE-- -<?php - -$a = array(); -$a[] = &$a; - -var_dump($a); -var_dump(json_encode($a)); - -/* Break circular data structure to prevent memory leaks */ -unset($a[0]); - -echo "Done\n"; -?> ---EXPECTF-- -array(1) { - [0]=> - &array(1) { - [0]=> - &array(1) { - [0]=> - *RECURSION* - } - } -} - -Warning: json_encode(): recursion detected in %s on line %d -string(8) "[[null]]" -Done |