summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/typed_properties_100.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/type_declarations/typed_properties_100.phpt')
-rw-r--r--Zend/tests/type_declarations/typed_properties_100.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/type_declarations/typed_properties_100.phpt b/Zend/tests/type_declarations/typed_properties_100.phpt
new file mode 100644
index 0000000000..8ee3deb0f7
--- /dev/null
+++ b/Zend/tests/type_declarations/typed_properties_100.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Property type not enforced for __get if the property is not visible
+--FILE--
+<?php
+
+class Test {
+ private int $prop;
+
+ public function __get($name) {
+ return "foobar";
+ }
+}
+
+$test = new Test;
+var_dump($test->prop);
+
+?>
+--EXPECT--
+string(6) "foobar"