mirror of
https://github.com/php/php-src.git
synced 2024-12-04 15:23:44 +08:00
24 lines
281 B
PHP
24 lines
281 B
PHP
--TEST--
|
|
json_encode() & endless loop - 3
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("json")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = array();
|
|
$a[] = $a;
|
|
|
|
var_dump($a);
|
|
var_dump(json_encode($a));
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
array(1) {
|
|
[0]=>
|
|
array(0) {
|
|
}
|
|
}
|
|
string(4) "[[]]"
|
|
Done
|