[php-src] Issue #20871: Bad error line and file for invalid "-d" arguments
| From: | kkmuffme | Date: | Fri, 09 Jan 2026 01:42:17 +0000 |
| Subject: | [php-src] Issue #20871: Bad error line and file for invalid "-d" arguments | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251503@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/20871
Author: kkmuffme
### Description
The following code:
```php
php -d 'foo=bar=asd' -r "echo 'hello' . PHP_EOL;"
```
Resulted in this output:
```
PHP: syntax error, unexpected '=' in Unknown on line 6
hello
```
But I expected this output instead:
```
PHP: syntax error, unexpected '=' in -d option on line 0
hello
```
Not sure where it gets that line 6 from, and the "Unknown" could also be improved
### PHP Version
```plain
8.5
```
### Operating System
_No response_