i have code look like this:
abstract class Object { public static function __callStatic($name, $parameters) { $object = get_called_class(); $object = new $object; if (method_exists($object, $name)) { return call_user_func_array(array($object, $name), $parameters); } } } class Log extends Object { public function message($message) { echo 'Log: '.$message.'.<br>'; } } now, i call:
Log::message('test'); this's result:
Strict standards: Non-static method Log::message() should not be called statically...
Log: test.
somebody can help me?
messagethe way you did, just changepublic function message($message)topublic static function message($message)__callStatic()is only available from 5.3.0