hhvm
hhvm copied to clipboard
When invoking an inherited method with a ReflectionMethod, get_called_class() mistakenly returns the parent class
class Foo {
public static function bar() {
echo get_called_class()."\n";
}
}
class Baz extends Foo { }
$class = new ReflectionClass('Baz');
$method = $class->getMethod('bar');
$method->invoke(null); // Zend prints 'Baz', HHVM prints 'Foo'
This is likely related to something contained in #1600
Thanks for reporting this. Agree with the assessment on #1600.