xref: /PHP-7.4/ext/json/tests/005.phpt (revision ded3d984)
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--EXPECT--
17array(1) {
18  [0]=>
19  array(0) {
20  }
21}
22string(4) "[[]]"
23Done
24