Annotation of embedaddon/php/ext/json/tests/bug43941.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #43941 (json_encode() invalid UTF-8)
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("json")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: var_dump(json_encode("abc"));
! 9: var_dump(json_encode("ab\xE0"));
! 10: var_dump(json_encode("ab\xE0c"));
! 11: var_dump(json_encode(array("ab\xE0", "ab\xE0c", "abc")));
! 12:
! 13: echo "Done\n";
! 14: ?>
! 15: --EXPECTF--
! 16: string(5) ""abc""
! 17: string(4) "null"
! 18: string(4) "null"
! 19: string(17) "[null,null,"abc"]"
! 20: Done
! 21:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>