summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/typed_properties_011.phpt
blob: f06333371f4070d06d502bb04022c169ac27710d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Test typed properties allow fetch reference for init array
--FILE--
<?php
class Foo {
    public int $bar = 1;
}

$foo = new Foo();

$array = [&$foo->bar];
var_dump($array);
?>
--EXPECT--
array(1) {
  [0]=>
  &int(1)
}