1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 05:51:02 +02:00
Files
archived-php-src/ext/reflection/tests/bug60367.phpt
2011-11-24 09:16:11 +00:00

27 lines
364 B
PHP

--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