xref: /PHP-7.1/ext/json/tests/005.phpt (revision ebf4cd30)
1--TEST--
2json_encode() & endless loop - 3
3--SKIPIF--
4<?php if (!extension_loaded("json")) print "skip"; ?>
5--FILE--
6<?php
7
8$a = array();
9$a[] = $a;
10
11var_dump($a);
12var_dump(json_encode($a));
13
14echo "Done\n";
15?>
16--EXPECTF--
17array(1) {
18  [0]=>
19  array(0) {
20  }
21}
22string(4) "[[]]"
23Done
24