xref: /php-src/ext/json/tests/bug41034.phpt (revision 32a1ebbd)
1--TEST--
2Bug #41034 (json_encode() ignores null byte started keys in arrays)
3--FILE--
4<?php
5echo json_encode(array(0, "\0ab"=>1, "\0null-prefixed value"));
6echo "\nDone\n";
7?>
8--EXPECT--
9{"0":0,"\u0000ab":1,"1":"\u0000null-prefixed value"}
10Done
11