Annotation of embedaddon/php/ext/json/tests/bug53946.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: bug #53946 (json_encode() with JSON_UNESCAPED_UNICODE)
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("json")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7: var_dump(json_encode("latin 1234 -/ russian мама мыла раму specialchars \x02 \x08 \n U+1D11E >𝄞<"));
! 8: var_dump(json_encode("latin 1234 -/ russian мама мыла раму specialchars \x02 \x08 \n U+1D11E >𝄞<", JSON_UNESCAPED_UNICODE));
! 9: var_dump(json_encode("ab\xE0"));
! 10: var_dump(json_encode("ab\xE0", JSON_UNESCAPED_UNICODE));
! 11: ?>
! 12: --EXPECT--
! 13: string(156) ""latin 1234 -\/ russian \u043c\u0430\u043c\u0430 \u043c\u044b\u043b\u0430 \u0440\u0430\u043c\u0443 specialchars \u0002 \b \n U+1D11E >\ud834\udd1e<""
! 14: string(100) ""latin 1234 -\/ russian мама мыла раму specialchars \u0002 \b \n U+1D11E >𝄞<""
! 15: string(4) "null"
! 16: string(4) "null"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>