summaryrefslogtreecommitdiff
path: root/Zend/tests/bug78151.phpt
blob: 87b98a4e44aa58072ce259cabfd2ece5004b61cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"