2. Saw lots and lots of static method calls
3. Closed page again.
This way of judging frameworks has never failed me.
2. Saw lots and lots of static method calls
3. Closed page again.
This way of judging frameworks has never failed me.
There is nothing wrong with a static call under a lot of conditions (not stateful, no override requirements etc).
The same people also tend not to complain about C paradoxically.
* Lots of static calls are indicative of function classes - classes as namespaces for functions, and not a real OOP approach
There's nothing wrong with static calls per-se, but lots of them is a code smell in most cases.
You can as of PHP 5.3 with late static bindings. `static::function()` will use the inheritance chain to find `function`
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
In a language like Python, it's not uncommon to be far more discriminating about what is a class and what is just implemented using functions. That design is lost on PHP really.
*I disagree with the loathing. The backslash is a bit ugly but life goes on.