1--TEST-- 2Bug #78151 Segfault caused by indirect expressions in PHP 7.4a1 3--FILE-- 4<?php 5 6class Arr 7{ 8 private $foo = ''; 9 10 public function __construct(array $array = []) 11 { 12 $property = 'foo'; 13 14 $this->{$property} = &$array[$property]; 15 16 \var_dump($this->foo); 17 } 18} 19 20$arr = new Arr(['foo' => 'bar']); 21?> 22--EXPECT-- 23string(3) "bar" 24