1 | <?php |
||
16 | class UnresolvableArgumentException extends \InvalidArgumentException |
||
17 | { |
||
18 | 7 | public static function fromParameter(\ReflectionParameter $parameter) : self |
|
27 | |||
28 | /** |
||
29 | * @param \ReflectionFunctionAbstract $reflection |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | 7 | private static function getFunctionName(\ReflectionFunctionAbstract $reflection) : string |
|
43 | } |
||
44 |
Let’s assume you have a class which uses late-static binding:
}
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()
on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClass
to useself
instead: