mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
17 lines
317 B
PHP
17 lines
317 B
PHP
--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
|
|
|