Unterminated JSON strings are misleadingly reported as “Control character error”
BugExtension: jsonStatus: Verified
### Description
The following code:
```php
<?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
```plain
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_
0 条评论