Home
last modified time | relevance | path

Searched refs:json_encode (Results 26 – 50 of 60) sorted by path

123

/PHP-7.4/ext/json/tests/
H A Dbug66021.phpt12 echo json_encode(array(array(), (object) array(), new Foo), JSON_PRETTY_PRINT);
H A Dbug66025.phpt2 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 Dbug68567.phpt8 var_dump(json_encode(array("\x80" => 1), JSON_PARTIAL_OUTPUT_ON_ERROR));
H A Dbug68992.phpt2 Bug #68992 (json_encode stacks exceptions thrown by JsonSerializable classes)
21 json_encode($classes);
H A Dbug71835.phpt2 Bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable)
14 var_dump(json_encode($arr));
23 var_dump(json_encode($arr));
H A Dbug72069.phpt2 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 Dbug73113.phpt19 echo json_encode($obj);
H A Dbug73254.phpt2 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 Dbug77843.phpt19 var_dump(json_encode([&$arr]));
H A Dinf_nan_error.phpt12 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 Djson_encode_basic.phpt2 Test json_encode() function : basic functionality
7 echo "*** Testing json_encode() : basic functionality ***\n";
80 // loop through with each element of the $inputs array to test json_encode() function
84 var_dump(json_encode($input));
91 *** Testing json_encode() : basic functionality ***
H A Djson_encode_basic_utf8.phpt2 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 Djson_encode_exceptions.phpt2 Test json_encode() function : JSON_THROW_ON_ERROR flag
9 var_dump(json_encode("\x80", JSON_THROW_ON_ERROR));
17 var_dump(json_encode("\x80", JSON_THROW_ON_ERROR | JSON_PARTIAL_OUTPUT_ON_ERROR));
43 string(11) "json_encode"
H A Djson_encode_invalid_utf8.phpt2 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 Djson_encode_numeric.phpt2 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 Djson_encode_pretty_print.phpt2 json_encode() with JSON_PRETTY_PRINT
9 $pretty = json_encode($struct, JSON_PRETTY_PRINT);
H A Djson_encode_u2028_u2029.phpt2 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 Djson_encode_unescaped_slashes.phpt7 var_dump(json_encode('a/b'));
8 var_dump(json_encode('a/b', JSON_UNESCAPED_SLASHES));
H A Djson_exceptions_error_clearing.phpt34 json_encode(NAN, JSON_THROW_ON_ERROR);
H A Dpass001.1.phpt90 $obj_enc = json_encode($obj, JSON_PARTIAL_OUTPUT_ON_ERROR);
93 $arr_enc = json_encode($arr, JSON_PARTIAL_OUTPUT_ON_ERROR);
H A Dpass001.1_64bit.phpt91 $obj_enc = json_encode($obj, JSON_PARTIAL_OUTPUT_ON_ERROR);
94 $arr_enc = json_encode($arr, JSON_PARTIAL_OUTPUT_ON_ERROR);
H A Dpass001.phpt80 $obj_enc = json_encode($obj, JSON_PARTIAL_OUTPUT_ON_ERROR);
83 $arr_enc = json_encode($arr, JSON_PARTIAL_OUTPUT_ON_ERROR);
H A Dpass002.phpt18 $obj_enc = json_encode($obj);
21 $arr_enc = json_encode($arr);
H A Dpass003.phpt26 $obj_enc = json_encode($obj);
29 $arr_enc = json_encode($arr);
H A Dserialize.phpt2 json_encode() Serialization tests
60 echo json_encode(new $class($adata)), "\n";
61 echo json_encode(new $class($ndata)), "\n";
62 echo json_encode(new $class($odata)), "\n";

Completed in 51 milliseconds

123