summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/typed_properties_010.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/type_declarations/typed_properties_010.phpt')
-rw-r--r--Zend/tests/type_declarations/typed_properties_010.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/type_declarations/typed_properties_010.phpt b/Zend/tests/type_declarations/typed_properties_010.phpt
new file mode 100644
index 0000000000..fd7d367fea
--- /dev/null
+++ b/Zend/tests/type_declarations/typed_properties_010.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test typed properties allow fetch reference
+--FILE--
+<?php
+class Foo {
+ public int $bar = 1;
+}
+
+$cb = function(int &$bar) {
+ var_dump($bar);
+};
+
+$foo = new Foo();
+$cb($foo->bar);
+?>
+--EXPECT--
+int(1)