[php-src] Issue #8034: extract($GLOBALS, EXTR_REFS); is broken in php8.1
| From: | divinity76 | Date: | Fri, 04 Feb 2022 10:47:22 +0000 |
| Subject: | [php-src] Issue #8034: extract($GLOBALS, EXTR_REFS); is broken in php8.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239476@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8034
Author: divinity76
### Description
The following code:
```php
<?php
$g=5;
(function(){
extract($GLOBALS, EXTR_REFS);
var_dump($g);
$g=6;
})();
var_dump($g);
```
Resulted in this output:
```
int(5)
int(5)
```
as of 8.1, but in php <8.1 it results in this output:
```
int(5)
int(6)
```
3v4l: https://3v4l.org/VrkkL
### PHP Version
PHP 8.1
### Operating System
_No response_