3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Core { protected static $_instance = null; public static function __callStatic($method, $args) { if (static::$_instance === null) { static::$_instance = new static; } return call_user_func_array(array(static::$_instance, $method.'Please'), $args); } public function getRequest() { return 'request'; } } class ConstructCore extends Core { public function getModulesManagerPlease() { return 'manager'; } public function getRequest() { return 'new request'; } } var_dump(ConstructCore::getModulesManager()); var_dump(ConstructCore::getRequest());
based on sWA7q
Output for 7.0.0 - 7.2.0
string(7) "manager" Deprecated: Non-static method ConstructCore::getRequest() should not be called statically in /in/h2ECr on line 36 string(11) "new request"
Output for 5.3.20 - 5.6.28
string(7) "manager" Strict Standards: Non-static method ConstructCore::getRequest() should not be called statically in /in/h2ECr on line 36 string(11) "new request"