Home
last modified time | relevance | path

Searched refs:json_decode (Results 1 – 25 of 43) sorted by relevance

12

/PHP-8.2/ext/json/tests/
H A D001.phpt2 json_decode() tests
6 var_dump(json_decode(""));
7 var_dump(json_decode("", 1));
8 var_dump(json_decode("", 0));
9 var_dump(json_decode(".", 1));
10 var_dump(json_decode(".", 0));
11 var_dump(json_decode("<?>"));
12 var_dump(json_decode(";"));
13 var_dump(json_decode("руссиш"));
14 var_dump(json_decode("blah"));
[all …]
H A Dbug42090.phpt2 Bug #42090 (json_decode causes segmentation fault)
6 json_decode('""'),
7 json_decode('"..".'),
8 json_decode('"'),
9 json_decode('""""'),
11 json_decode(json_encode('"')),
12 json_decode(json_encode('""'))
H A Dbug69187.phpt5 var_dump(json_decode(FALSE));
7 var_dump(json_decode(""));
10 var_dump(json_decode(0));
12 var_dump(json_decode(1));
14 var_dump(json_decode(TRUE));
17 json_decode("\xED\xA0\xB4");
20 json_decode("\x00");
23 json_decode("\"\xED\xA0\xB4\"");
26 json_decode("\"\x00\"");
H A Djson_decode_error.phpt2 Test json_decode() function : error conditions
5 echo "*** Testing json_decode() : error conditions ***\n";
7 echo "\n-- Testing json_decode() function with depth below 0 --\n";
10 var_dump(json_decode('"abc"', true, -1));
17 *** Testing json_decode() : error conditions ***
19 -- Testing json_decode() function with depth below 0 --
20 json_decode(): Argument #3 ($depth) must be greater than 0
H A Dbug54484.phpt2 Bug #54484 (Empty string in json_decode doesn't reset json_last_error)
5 json_decode('{"test":"test"}');
8 json_decode("");
11 json_decode("invalid json");
14 json_decode("\"\001 invalid json\"");
17 json_decode("");
H A Dbug41403.phpt2 Bug #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.')
15 var_dump(json_decode('[2.1]'));
16 var_dump(json_decode('[0.15]'));
17 var_dump(json_decode('[123.13452345]'));
18 var_dump(json_decode('[123,13452345]'));
H A Dbug50224.phpt17 var_dump(json_decode(json_encode(12.3, JSON_PRESERVE_ZERO_FRACTION)));
18 var_dump(json_decode(json_encode(12, JSON_PRESERVE_ZERO_FRACTION)));
19 var_dump(json_decode(json_encode(12.0, JSON_PRESERVE_ZERO_FRACTION)));
20 var_dump(json_decode(json_encode(0.0, JSON_PRESERVE_ZERO_FRACTION)));
21 var_dump(json_decode(json_encode(array(12, 12.0, 12.3), JSON_PRESERVE_ZERO_FRACTION)));
22 var_dump(json_decode(json_encode((object)array('float' => 12.0, 'integer' => 12), JSON_PRESERVE_ZER…
23 var_dump(json_decode(json_encode((object)array('float' => 12.0, 'integer' => 12), JSON_PRESERVE_ZER…
H A D007.phpt5 var_dump(json_decode("[1]"));
7 var_dump(json_decode("[[1]]", false, 2));
9 var_dump(json_decode("[1}"));
11 var_dump(json_decode('["' . chr(0) . 'abcd"]'));
13 var_dump(json_decode("[1"));
H A Dbug41504.phpt2 Bug #41504 (json_decode() converts empty array keys to "_empty_")
6 var_dump(json_decode('{"":"value"}', true));
7 var_dump(json_decode('{"":"value", "key":"value"}', true));
8 var_dump(json_decode('{"key":"value", "":"value"}', true));
H A Dbug73991.phpt8 var_dump(json_decode($json, false));
9 var_dump(json_decode($json, true));
10 var_dump(json_decode($json, null, 512, 0));
11 var_dump(json_decode($json, null, 512, JSON_OBJECT_AS_ARRAY));
H A D008.phpt2 json_decode() with large integers
6 $x = json_decode($json);
8 $x = json_decode($json, false, 512, JSON_BIGINT_AS_STRING);
H A Djson_decode_invalid_utf8.phpt2 json_decode() invalid UTF8
6 var_dump(json_decode($str));
7 var_dump(json_decode($str, true, 512, JSON_INVALID_UTF8_IGNORE));
8 $json = json_decode($str, true, 512, JSON_INVALID_UTF8_SUBSTITUTE);
H A Dbug72787.phpt2 Bug #72787 (json_decode reads out of bounds)
9 var_dump(json_decode('[]', false, 0x100000000));
16 json_decode(): Argument #3 ($depth) must be less than %d
H A Dbug68546.phpt2 Bug #68546 (json_decode() Fatal error: Cannot access property started with '\0')
6 var_dump(json_decode('{"key": {"\u0000": "aa"}}'));
8 var_dump(json_decode('[{"key1": 0, "\u0000": 1}]'));
H A Djson_decode_basic.phpt2 Test json_decode() function : basic functionality
5 echo "*** Testing json_decode() : basic functionality ***\n";
30 // loop through with each element of the $inputs array to test json_decode() function
34 var_dump(json_decode($input));
35 var_dump(json_decode($input, true));
41 *** Testing json_decode() : basic functionality ***
H A Dbug63737.phpt2 Bug #63737 (json_decode does not properly decode with options parameter)
6 $x = json_decode($json);
8 $x = json_decode($json, false, 512, JSON_BIGINT_AS_STRING);
H A Djson_decode_exceptions.phpt2 Test json_decode() function : JSON_THROW_ON_ERROR flag
7 var_dump(json_decode("{", false, 512, JSON_THROW_ON_ERROR));
34 string(11) "json_decode"
H A Dbug68938.phpt2 Bug #68938 (json_decode() decodes empty string without indicating error)
5 json_decode("");
H A Dbug45791.phpt2 Bug #45791 (json_decode() does not handle number 0e0)
6 var_dump(json_decode('{"zero": 0e0}'));
H A Dbug62010.phpt2 Bug #62010 (json_decode produces invalid byte-sequences)
6 var_dump(json_decode('"\ud834"'));
H A Djson_exceptions_error_clearing.phpt10 json_decode("\xFF");
15 json_decode("", false, 512, JSON_THROW_ON_ERROR);
23 json_decode("{", false, 512, JSON_THROW_ON_ERROR);
H A Djson_encode_pretty_print.phpt6 $struct = json_decode($json);
9 $pretty = json_decode($pretty);
H A Dbug72069.phpt6 $result = json_encode(['end' => json_decode('', true)]);
13 return ['end' => json_decode('', true)];
H A Dpass002.phpt9 $obj = json_decode($test);
12 $arr = json_decode($test, true);
23 $obj = json_decode($obj_enc);
26 $arr = json_decode($arr_enc, true);
/PHP-8.2/ext/pcre/tests/
H A Dbug79241.phpt6 // if "’" string is used directly without json_decode,
8 $text = json_decode('"’"');

Completed in 21 milliseconds

12