diff options
| author | Xinchen Hui <laruence@php.net> | 2011-11-24 09:16:11 +0000 |
|---|---|---|
| committer | Xinchen Hui <laruence@php.net> | 2011-11-24 09:16:11 +0000 |
| commit | 3db55c8233420b8713155302ca42b5851ac94c67 (patch) | |
| tree | 5113deeb92e0f9541f5711b12dfd769d5a76ccd9 /ext/reflection/tests | |
| parent | c05614fb6d6f9d4d44b5fa9878635d6e5cdb0b1c (diff) | |
| download | php-git-3db55c8233420b8713155302ca42b5851ac94c67.tar.gz | |
Fixed bug #60367 (Reflection and Late Static Binding)
Diffstat (limited to 'ext/reflection/tests')
| -rw-r--r-- | ext/reflection/tests/bug60367.phpt | 26 |
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 0000000000..31e8a2e947 --- /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 |
