mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
test for bug #78151
This commit is contained in:
parent
175c7bf6fe
commit
b2b0e52466
23
Zend/tests/bug78151.phpt
Normal file
23
Zend/tests/bug78151.phpt
Normal file
@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #78151 Segfault caused by indirect expressions in PHP 7.4a1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Arr
|
||||
{
|
||||
private $foo = '';
|
||||
|
||||
public function __construct(array $array = [])
|
||||
{
|
||||
$property = 'foo';
|
||||
|
||||
$this->{$property} = &$array[$property];
|
||||
|
||||
\var_dump($this->foo);
|
||||
}
|
||||
}
|
||||
|
||||
$arr = new Arr(['foo' => 'bar']);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(3) "bar"
|
Loading…
Reference in New Issue
Block a user