1--TEST--
2json_encode() tests for U+2028, U+2029
3--FILE--
4<?php
5var_dump(json_encode(array("a\xC3\xA1b")));
6var_dump(json_encode(array("a\xC3\xA1b"), JSON_UNESCAPED_UNICODE));
7var_dump(json_encode("a\xE2\x80\xA7b"));
8var_dump(json_encode("a\xE2\x80\xA7b", JSON_UNESCAPED_UNICODE));
9var_dump(json_encode("a\xE2\x80\xA8b"));
10var_dump(json_encode("a\xE2\x80\xA8b", JSON_UNESCAPED_UNICODE));
11var_dump(json_encode("a\xE2\x80\xA8b", JSON_UNESCAPED_LINE_TERMINATORS));
12var_dump(json_encode("a\xE2\x80\xA8b", JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_TERMINATORS));
13var_dump(json_encode("a\xE2\x80\xA9b"));
14var_dump(json_encode("a\xE2\x80\xA9b", JSON_UNESCAPED_UNICODE));
15var_dump(json_encode("a\xE2\x80\xA9b", JSON_UNESCAPED_LINE_TERMINATORS));
16var_dump(json_encode("a\xE2\x80\xA9b", JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_TERMINATORS));
17var_dump(json_encode("a\xE2\x80\xAAb"));
18var_dump(json_encode("a\xE2\x80\xAAb", JSON_UNESCAPED_UNICODE));
19?>
20--EXPECT--
21string(12) "["a\u00e1b"]"
22string(8) "["aáb"]"
23string(10) ""a\u2027b""
24string(7) ""a‧b""
25string(10) ""a\u2028b""
26string(10) ""a\u2028b""
27string(10) ""a\u2028b""
28string(7) ""a
b""
29string(10) ""a\u2029b""
30string(10) ""a\u2029b""
31string(10) ""a\u2029b""
32string(7) ""a
b""
33string(10) ""a\u202ab""
34string(7) ""a‪b""
35