[php-src] Issue #22514: Incorrect error column in PHP 8.6 JSON parser

[email protected] (TimWolla) Mon, 29 Jun 2026 17:15:18 +0000
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/22514
Author: TimWolla

### Description

The following code:

```php
<?php

var_dump(json_decode('
{"\u00FF"_'));/*
1234567890 */
var_dump(json_last_error_msg());
```

Resulted in this output:
```
NULL
string(30) "Syntax error near location 2:5"
```

But I expected this output instead:
```
NULL
string(30) "Syntax error near location 2:10"
```

see https://github.com/php/php-src/pull/22487#discussion_r3493424214

### PHP Version

```plain
PHP 8.6.0-dev (cli) (built: Jun 29 2026 19:08:37) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.6.0-dev, Copyright © Zend by Perforce
    with Zend OPcache v8.6.0-dev, Copyright ©, by Zend by Perforce
```

### Operating System

_No response_