summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug63614.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests/bug63614.phpt')
-rw-r--r--ext/reflection/tests/bug63614.phpt41
1 files changed, 41 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug63614.phpt b/ext/reflection/tests/bug63614.phpt
new file mode 100644
index 0000000000..c13ff4b20e
--- /dev/null
+++ b/ext/reflection/tests/bug63614.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Bug #63614 (Fatal error on Reflection)
+--FILE--
+<?php
+function dummy() {
+ static $a = array();
+}
+
+class Test
+{
+ const A = 0;
+
+ public function func()
+ {
+ static $a = array(
+ self::A => 'a'
+ );
+ }
+}
+
+$reflect = new ReflectionFunction("dummy");
+print_r($reflect->getStaticVariables());
+$reflect = new ReflectionMethod('Test', 'func');
+print_r($reflect->getStaticVariables());
+?>
+--EXPECT--
+Array
+(
+ [a] => Array
+ (
+ )
+
+)
+Array
+(
+ [a] => Array
+ (
+ [0] => a
+ )
+
+)