mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
24 lines
336 B
PHP
24 lines
336 B
PHP
--TEST--
|
|
GH-18209: Use-after-free in extract() with EXTR_REFS
|
|
--CREDITS--
|
|
Noam Rathaus (nrathaus)
|
|
--FILE--
|
|
<?php
|
|
|
|
class C {
|
|
public function __destruct() {
|
|
var_dump($GLOBALS['b']);
|
|
$GLOBALS['b'] = 43;
|
|
}
|
|
}
|
|
|
|
$b = new C;
|
|
$array = ['b' => 42];
|
|
extract($array, EXTR_REFS);
|
|
var_dump($b);
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(42)
|
|
int(43)
|