mirror of
https://github.com/php/php-src.git
synced 2025-01-27 06:03:45 +08:00
Merge branch 'PHP-7.4'
This commit is contained in:
commit
6e1d899d3d
16
ext/json/tests/009.phpt
Normal file
16
ext/json/tests/009.phpt
Normal file
@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
json_encode() with non-packed array that should be encoded as an array rather than object
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("json")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(1, 2, 3, 'foo' => 'bar');
|
||||
unset($a['foo']);
|
||||
|
||||
var_dump(json_encode($a));
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
string(7) "[1,2,3]"
|
||||
Done
|
||||
|
Loading…
Reference in New Issue
Block a user