2016-08-23 16:01 GMT+03:00 Julien Pauli <jpa...@php.net>: > This : > > class A { public static function foo() { } } > class B extends A { public static function foo() { } } > > $a = new reflectionMethod('A', 'foo'); > $a->invoke('B'); >
It's perfect way for me. Just to be sure: in this case we will invoke A::foo() method, but the scope (static::class) will be 'B', right? If yes, then everything is ok and it will be compatible with all existing code but will have an additional meaning for calling methods with children's scope.