diff options
Diffstat (limited to 'Zend/tests/type_declarations/typed_properties_099.phpt')
-rw-r--r-- | Zend/tests/type_declarations/typed_properties_099.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Zend/tests/type_declarations/typed_properties_099.phpt b/Zend/tests/type_declarations/typed_properties_099.phpt new file mode 100644 index 0000000000..1e450ce818 --- /dev/null +++ b/Zend/tests/type_declarations/typed_properties_099.phpt @@ -0,0 +1,20 @@ +--TEST-- +Check that iterating a typed property by reference adds a type source +--FILE-- +<?php + +class Test { + public array $ary = []; +} + +$test = new Test; +foreach ($test->ary as &$value) {} +var_dump($test); + +?> +--EXPECT-- +object(Test)#1 (1) { + ["ary"]=> + array(0) { + } +} |