summaryrefslogtreecommitdiff
path: root/ext/json/tests/bug41034.phpt
blob: 58ae281e6c40e7a0f6c635015d59f3bf5978f74d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--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