summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/typed_properties_098.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/type_declarations/typed_properties_098.phpt')
-rw-r--r--Zend/tests/type_declarations/typed_properties_098.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/type_declarations/typed_properties_098.phpt b/Zend/tests/type_declarations/typed_properties_098.phpt
new file mode 100644
index 0000000000..48e443c458
--- /dev/null
+++ b/Zend/tests/type_declarations/typed_properties_098.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Make sure uninitialized property is initialized to null when taken by reference
+--FILE--
+<?php
+
+class Test {
+ public $prop;
+}
+
+$test = new Test;
+unset($test->prop);
+$ref =& $test->prop;
+var_dump($ref);
+
+?>
+--EXPECT--
+NULL