xref: /PHP-8.2/ext/json/tests/009.phpt (revision 32a1ebbd)
1--TEST--
2json_encode() with non-packed array that should be encoded as an array rather than object
3--FILE--
4<?php
5$a = array(1, 2, 3, 'foo' => 'bar');
6unset($a['foo']);
7
8var_dump(json_encode($a));
9echo "Done\n";
10?>
11--EXPECT--
12string(7) "[1,2,3]"
13Done
14
15