/PHP-7.2/ext/json/tests/ |
H A D | 002.phpt | 2 json_encode() tests 8 var_dump(json_encode("")); 9 var_dump(json_encode(NULL)); 10 var_dump(json_encode(TRUE)); 12 var_dump(json_encode(array(""=>""))); 13 var_dump(json_encode(array(array(1)))); 14 var_dump(json_encode(array())); 16 var_dump(json_encode(array(""=>""), JSON_FORCE_OBJECT)); 18 var_dump(json_encode(array(), JSON_FORCE_OBJECT)); 20 var_dump(json_encode(1)); [all …]
|
H A D | bug50224.phpt | 2 bug #50224 (json_encode() does not always encode a float as a float) 10 var_dump(json_encode(12.3, JSON_PRESERVE_ZERO_FRACTION)); 11 var_dump(json_encode(12, JSON_PRESERVE_ZERO_FRACTION)); 12 var_dump(json_encode(12.0, JSON_PRESERVE_ZERO_FRACTION)); 13 var_dump(json_encode(0.0, JSON_PRESERVE_ZERO_FRACTION)); 14 var_dump(json_encode(array(12, 12.0, 12.3), JSON_PRESERVE_ZERO_FRACTION)); 19 var_dump(json_decode(json_encode(12.3, JSON_PRESERVE_ZERO_FRACTION))); 20 var_dump(json_decode(json_encode(12, JSON_PRESERVE_ZERO_FRACTION))); 21 var_dump(json_decode(json_encode(12.0, JSON_PRESERVE_ZERO_FRACTION))); 22 var_dump(json_decode(json_encode(0.0, JSON_PRESERVE_ZERO_FRACTION))); [all …]
|
H A D | json_encode_u2028_u2029.phpt | 2 json_encode() tests for U+2028, U+2029 7 var_dump(json_encode(array("a\xC3\xA1b"))); 8 var_dump(json_encode(array("a\xC3\xA1b"), JSON_UNESCAPED_UNICODE)); 9 var_dump(json_encode("a\xE2\x80\xA7b")); 10 var_dump(json_encode("a\xE2\x80\xA7b", JSON_UNESCAPED_UNICODE)); 11 var_dump(json_encode("a\xE2\x80\xA8b")); 12 var_dump(json_encode("a\xE2\x80\xA8b", JSON_UNESCAPED_UNICODE)); 15 var_dump(json_encode("a\xE2\x80\xA9b")); 16 var_dump(json_encode("a\xE2\x80\xA9b", JSON_UNESCAPED_UNICODE)); 19 var_dump(json_encode("a\xE2\x80\xAAb")); [all …]
|
H A D | json_encode_error.phpt | 2 Test json_encode() function : error conditions 7 echo "*** Testing json_encode() : error conditions ***\n"; 9 echo "\n-- Testing json_encode() function with no arguments --\n"; 10 var_dump(json_encode()); 12 echo "\n-- Testing json_encode() function with more than expected no. of arguments --\n"; 14 var_dump(json_encode("abc", 0, $extra_arg)); 19 *** Testing json_encode() : error conditions *** 21 -- Testing json_encode() function with no arguments -- 23 Warning: json_encode() expects at least 1 parameter, 0 given in %s on line %d 26 -- Testing json_encode() function with more than expected no. of arguments --
|
H A D | json_encode_numeric.phpt | 2 Test json_encode() function with numeric flag 10 json_encode("1", JSON_NUMERIC_CHECK), 11 json_encode("9.4324", JSON_NUMERIC_CHECK), 12 json_encode(array("122321", "3232595.33423"), JSON_NUMERIC_CHECK), 13 json_encode("1"), 14 json_encode("9.4324"), 15 json_encode(array("122321", "3232595.33423"))
|
H A D | bug73254.phpt | 2 Bug #73254 (Incorrect indentation generated by json_encode() with JSON_PRETTY_PRINT) 10 echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n"; 14 echo json_encode($data), "\n"; 15 echo json_encode([json_encode([1], JSON_PRETTY_PRINT)]), "\n";
|
H A D | 006.phpt | 2 json_encode() & extended encoding 9 echo "Normal: ", json_encode($a), "\n"; 10 echo "Tags: ", json_encode($a, JSON_HEX_TAG), "\n"; 11 echo "Apos: ", json_encode($a, JSON_HEX_APOS), "\n"; 12 echo "Quot: ", json_encode($a, JSON_HEX_QUOT), "\n"; 13 echo "Amp: ", json_encode($a, JSON_HEX_AMP), "\n"; 14 echo "All: ", json_encode($a, JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_QUOT|JSON_HEX_AMP), "\n";
|
H A D | json_encode_invalid_utf8.phpt | 2 json_encode() invalid UTF8 10 var_dump(json_encode($str)); 11 var_dump(json_encode($str, JSON_INVALID_UTF8_IGNORE)); 12 var_dump(json_encode($str, JSON_INVALID_UTF8_SUBSTITUTE)); 13 var_dump(json_encode($str, JSON_UNESCAPED_UNICODE)); 14 var_dump(bin2hex(json_encode($str, JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE)));
|
H A D | bug43941.phpt | 2 Bug #43941 (json_encode() invalid UTF-8) 8 var_dump(json_encode("abc")); 9 var_dump(json_encode("ab\xE0")); 10 var_dump(json_encode("ab\xE0", JSON_PARTIAL_OUTPUT_ON_ERROR)); 11 var_dump(json_encode(array("ab\xE0", "ab\xE0c", "abc"), JSON_PARTIAL_OUTPUT_ON_ERROR));
|
H A D | bug53946.phpt | 2 bug #53946 (json_encode() with JSON_UNESCAPED_UNICODE) 7 var_dump(json_encode("latin 1234 -/ russian мама мыла раму specialchars \x02 \x08 \n U+1D11… 8 var_dump(json_encode("latin 1234 -/ russian мама мыла раму specialchars \x02 \x08 \n U+1D11… 9 var_dump(json_encode("ab\xE0")); 10 var_dump(json_encode("ab\xE0", JSON_UNESCAPED_UNICODE));
|
H A D | bug61537.phpt | 2 Bug #61537 (json_encode() incorrectly truncates/discards information) 9 var_dump(json_encode($invalid_utf8)); 12 var_dump(json_encode($invalid_utf8, JSON_PARTIAL_OUTPUT_ON_ERROR)); 19 var_dump(json_encode($invalid_utf8)); 22 var_dump(json_encode($invalid_utf8, JSON_PARTIAL_OUTPUT_ON_ERROR));
|
H A D | bug72069.phpt | 2 Bug #72069 (Behavior \JsonSerializable different from json_encode) 8 $result = json_encode(['end' => json_decode(null, true)]); 20 $result = json_encode($a); 23 $result = json_encode($toJsonData);
|
H A D | json_encode_basic_utf8.phpt | 2 Test json_encode() function : basic functionality with UTF8 string input 7 echo "*** Testing json_encode() : basic functionality with UTF-8 input***\n"; 10 var_dump(json_encode($utf8_string)); 15 *** Testing json_encode() : basic functionality with UTF-8 input***
|
H A D | bug42090.phpt | 12 json_encode('"'), 13 json_decode(json_encode('"')), 14 json_decode(json_encode('""'))
|
H A D | bug66025.phpt | 2 Bug #66025 (Indent wrong when json_encode() called from jsonSerialize function) 12 return json_encode([1], JSON_PRETTY_PRINT); 16 echo json_encode([new Foo]), "\n";
|
H A D | bug54058.phpt | 10 json_encode($bad_utf8); 15 json_encode($a); 21 json_encode($b); 28 json_encode($c);
|
H A D | bug40503.phpt | 2 Bug #40503 (json_encode() value corruption on 32bit systems with overflown values) 14 json_test_show_eq("$value", json_encode($value)); 16 json_test_show_eq("$value", json_encode($value));
|
H A D | inf_nan_error.phpt | 12 var_dump(json_encode($inf)); 15 var_dump(json_encode($inf, JSON_PARTIAL_OUTPUT_ON_ERROR)); 24 var_dump(json_encode($nan)); 27 var_dump(json_encode($nan, JSON_PARTIAL_OUTPUT_ON_ERROR));
|
H A D | bug62369.phpt | 2 FR #62369 (Segfault on json_encode(deeply_nested_array) 13 json_encode($array, 0, 551); 23 json_encode($array, 0, 540);
|
H A D | bug71835.phpt | 2 Bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable) 14 var_dump(json_encode($arr)); 23 var_dump(json_encode($arr));
|
H A D | 003.phpt | 2 json_encode() & endless loop - 1 15 var_dump(json_encode($a)); 20 var_dump(json_encode($a, JSON_PARTIAL_OUTPUT_ON_ERROR));
|
H A D | 004.phpt | 2 json_encode() & endless loop - 2 15 var_dump(json_encode($a)); 20 var_dump(json_encode($a, JSON_PARTIAL_OUTPUT_ON_ERROR));
|
H A D | bug55543.phpt | 2 Bug #55543 (json_encode() with JSON_NUMERIC_CHECK & numeric string properties) 10 var_dump(json_encode($a, JSON_NUMERIC_CHECK));
|
H A D | json_encode_unescaped_slashes.phpt | 7 var_dump(json_encode('a/b')); 8 var_dump(json_encode('a/b', JSON_UNESCAPED_SLASHES));
|
/PHP-7.2/ext/simplexml/tests/ |
H A D | bug66084_1.phpt | 8 echo json_encode(simplexml_load_string('<a><b/><c><x/></c></a>')->c), "\n"; 9 echo json_encode(simplexml_load_string('<a><b/><c><x/></c></a>')), "\n"; 10 echo json_encode(simplexml_load_string('<a><b/><d/><c><x/></c></a>')), "\n"; 11 echo json_encode(simplexml_load_string('<a><b/><c><d/><x/></c></a>')), "\n"; 12 echo json_encode(simplexml_load_string('<a><b/><c><d><x/></d></c></a>')), "\n";
|