1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/array/bug77793.phpt
Nikita Popov e97577edde Fixed bug #77793
By making sure that we always first increment the refcount of the
new value before we destroy the old one.
2019-03-25 17:33:17 +01:00

19 lines
297 B
PHP

--TEST--
Bug #77793: Segmentation fault in extract() when overwriting reference with itself
--FILE--
<?php
$str = 'foo';
$vars = ['var' => $str . 'bar'];
$var = &$vars['var'];
extract($vars);
var_dump($vars, $var);
?>
--EXPECT--
array(1) {
["var"]=>
&string(6) "foobar"
}
string(6) "foobar"