php-src/ext/json/tests/bug41034.phpt
Antony Dovgal 7a6e0a1dd2 fix test
2007-04-16 09:11:10 +00:00

13 lines
308 B
PHP

--TEST--
Bug #41034 (json_encode() ignores null byte started keys in arrays)
--SKIPIF--
<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
echo json_encode(array(0,"\0ab"=>1,"\0null-prefixed value"));
echo "\nDone\n";
?>
--EXPECT--
{"0":0,"\u0000ab":1,"1":"\u0000null-prefixed value"}
Done