HN2new | past | comments | ask | show | jobs | submitlogin

> You can't extend a static method call

You can as of PHP 5.3 with late static bindings. `static::function()` will use the inheritance chain to find `function`



That's an inner method call, that's not the use case I was referring to. When you call a static function from a different class, you put the class name before the call, and make it different to substitute it - which you could easily if you were dealing with an instance.

Example

MyClass::func();

func() Is tied to MyClass. if you extend it, you will have to hunt down all of those calls and replace it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: