[php-src] Issue #22849: PHP 8.6 `error_include_args=1` mishandled for `include()`
[email protected] (TimWolla) Tue, 21 Jul 2026 14:26:33 +0000
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
Issue: https://github.com/php/php-src/issues/22849
Author: TimWolla
### Description
The following code:
```php
<?php
ini_set('error_include_args', '1');
function foo() {
include("does not exist");
}
foo(1, 2);
```
Resulted in this output:
```
Warning: include(1, 2): Failed to open stream: No such file or directory in /tmp/test3.php on line 6
Warning: include(1, 2): Failed opening 'does not exist' for inclusion (include_path='.:') in /tmp/test3.php on line 6
```
But I expected this output instead:
```
Warning: include("does not exist"): Failed to open stream: No such file or directory in /tmp/test3.php on line 6
Warning: include("does not exist"): Failed opening 'does not exist' for inclusion (include_path='.:') in /tmp/test3.php on line 6
```
### PHP Version
```plain
git master
```
### Operating System
_No response_