summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug78774.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests/bug78774.phpt')
-rw-r--r--ext/reflection/tests/bug78774.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug78774.phpt b/ext/reflection/tests/bug78774.phpt
new file mode 100644
index 0000000000..1e419b1138
--- /dev/null
+++ b/ext/reflection/tests/bug78774.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #78774: ReflectionNamedType on Typed Properties Crash
+--FILE--
+<?php
+
+class Test {
+ public stdClass $prop;
+}
+
+$rc = new ReflectionClass(Test::class);
+$rp = $rc->getProperty('prop');
+$rt = $rp->getType();
+
+// Force a resolution of the property type
+$test = new Test;
+$test->prop = new stdClass;
+
+var_dump($rt->getName());
+
+?>
+--EXPECT--
+string(8) "stdClass"