summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug60367.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests/bug60367.phpt')
-rw-r--r--ext/reflection/tests/bug60367.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug60367.phpt b/ext/reflection/tests/bug60367.phpt
new file mode 100644
index 000000000..31e8a2e94
--- /dev/null
+++ b/ext/reflection/tests/bug60367.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #60367 (Reflection and Late Static Binding)
+--FILE--
+<?php
+abstract class A {
+
+ const WHAT = 'A';
+
+ public static function call() {
+ echo static::WHAT;
+ }
+
+}
+
+class B extends A {
+
+ const WHAT = 'B';
+
+}
+
+$method = new ReflectionMethod("b::call");
+$method->invoke(null);
+$method = new ReflectionMethod("A::call");
+$method->invoke(null);
+--EXPECTF--
+BA