Is there any way I can check if a method is being called statically or on an instantiated object?
This is an old question, but I'll add an alternative answer.
There are two magic methods
__call($name, $arguments)
is triggered when invoking inaccessible methods in an object context.
__callStatic($name, $arguments)
is triggered when invoking inaccessible methods in a static context.
runTest('in object context');
MethodTest::runTest('in static context'); // As of PHP 5.3.0
Outputs
Calling object method 'runTest' in object context
Calling static method 'runTest' in static context