Description
The following code:
<?php
var_dump(json_decode('"'), json_last_error_msg());
Resulted in this output:
NULL
string(53) "Control character error, possibly incorrectly encoded"
But I expected this output instead: Something about EOF being reached.
PHP Version
PHP 8.5.7 (cli) (built: Jun 6 2026 05:36:56) (NTS)
Copyright (c) The PHP Group
Built by Ubuntu
Zend Engine v4.5.7, Copyright (c) Zend Technologies
with Zend OPcache v8.5.7, Copyright (c), by Zend Technologies
Operating System
No response
Description
The following code:
Resulted in this output:
But I expected this output instead: Something about EOF being reached.
PHP Version
Operating System
No response