bug78151.phpt 364 B

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