[php-src] Issue #8349: `??` does supress `Trying to access array offset on value of type bool` notice
| From: | mvorisek | Date: | Tue, 12 Apr 2022 11:59:13 +0000 |
| Subject: | [php-src] Issue #8349: `??` does supress `Trying to access array offset on value of type bool` notice | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240876@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8349
Author: mvorisek
### Description
The following code:
```php
var_dump(false[0]);
var_dump(false[0] ?? '');
```
https://3v4l.org/KKWOT
Resulted in this output:
```
Warning: Trying to access array offset on value of type bool in /in/KKWOT on line 3
NULL
string(0) ""
```
But I expected this output instead:
```
Warning: Trying to access array offset on value of type bool in /in/KKWOT on line 3
NULL
Warning: Trying to access array offset on value of type bool in /in/KKWOT on line 4
string(0) ""
```
### PHP Version
8 - master
### Operating System
any