1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00
Files
archived-php-src/ext/json/tests/009.phpt
2019-04-29 10:23:38 +02:00

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