diff options
author | Scott MacVicar <scottmac@php.net> | 2009-01-08 13:35:58 +0000 |
---|---|---|
committer | Scott MacVicar <scottmac@php.net> | 2009-01-08 13:35:58 +0000 |
commit | b08ceb79b31102b6372e27bc984e11fe2db9206b (patch) | |
tree | 59a7e22eb461cc2b7336f2f1d7e45c2b1519ecd3 /ext/json | |
parent | 9ccdaa362db0afaa86b7eef7e41b55935ad53677 (diff) | |
download | php-git-b08ceb79b31102b6372e27bc984e11fe2db9206b.tar.gz |
Fix broken test
Diffstat (limited to 'ext/json')
-rw-r--r-- | ext/json/tests/bug46944.phpt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/json/tests/bug46944.phpt b/ext/json/tests/bug46944.phpt index 735de04435..15ac0a6e97 100644 --- a/ext/json/tests/bug46944.phpt +++ b/ext/json/tests/bug46944.phpt @@ -6,7 +6,10 @@ Bug #46944 (json_encode() doesn't handle 3 byte utf8 correctly) <?php for ($i = 1; $i <= 16; $i++) { - echo json_encode(b"aa" . (0xf0|($i >> 2)) . (0x8f|($i & 3) << 4) . "\xbf\xbdzz") . "\n"; + $first = 0xf0|($i >> 2); + $second = 0x8f|($i & 3) << 4; + $string = sprintf("aa%c%c\xbf\xbdzz", $low, $high); + echo json_encode($string) . "\n"; } |