test for bug #78151

This commit is contained in:
Joe Watkins 2019-06-12 22:39:00 +02:00
parent 175c7bf6fe
commit b2b0e52466
No known key found for this signature in database
GPG Key ID: F9BA0ADA31CBD89E

23
Zend/tests/bug78151.phpt Normal file
View 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"