3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Core { protected static $_instance = null; public function __callStatic($method, $args) { if (static::$_instance === null) { static::$_instance = new static; } return call_user_func_array(array(static::$_instance, $method), $args) } } class ConstructCore extends Core { public function getModulesManager() { return 'manager'; } } var_dump(CostructCore::getModulesManager());
Output for 7.0.0
Parse error: syntax error, unexpected '}', expecting ';' in /in/qdBP8 on line 14
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Warning: The magic method __callStatic() must have public visibility and be static in /in/qdBP8 on line 7 Parse error: syntax error, unexpected '}' in /in/qdBP8 on line 14
Process exited with code 255.