Why can a method in TP5 be called in two ways?

for example, why can the max () method be called $this- > max ("id") as well as statically self::max (" id") ?

Mar.22,2021

static methods can be called through both methods.


the internal implementation mechanism is only. If a non-static method is called statically, the _ _ callStatic magic method will be touched internally, and the function will be automatically instantiated. 5.1.You can see that the facade (Facade); mechanism should be the same!

Menu