mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
These are no longer needed after https://wiki.php.net/rfc/always_enable_json Closes GH-5637
26 lines
426 B
PHP
26 lines
426 B
PHP
--TEST--
|
|
Bug #54484 (Empty string in json_decode doesn't reset json_last_error)
|
|
--FILE--
|
|
<?php
|
|
json_decode('{"test":"test"}');
|
|
var_dump(json_last_error());
|
|
|
|
json_decode("");
|
|
var_dump(json_last_error());
|
|
|
|
json_decode("invalid json");
|
|
var_dump(json_last_error());
|
|
|
|
json_decode("\"\001 invalid json\"");
|
|
var_dump(json_last_error());
|
|
|
|
json_decode("");
|
|
var_dump(json_last_error());
|
|
?>
|
|
--EXPECT--
|
|
int(0)
|
|
int(4)
|
|
int(4)
|
|
int(3)
|
|
int(4)
|