Get $this In A StaticΒΆ

A static method does not have access to the current object, by definition.

It is also possible to call statically any method within a class.

But when a static method calls a non-static method, an error is produced: Non-static method x::foo() cannot be called statically.

Finally, calling staticcally a non-static method still defines $this in the target method. Static is the nature of the method, not the call.

../_images/static_get_this.png