3v4l.org

run code in 300+ PHP versions simultaneously
<?php class schade { public function __construct(){ anvadb::disconnect(); } } class odbcdb { public function __callStatic($method, $arguments) { $this->method($arguments) } public function disconnect() { self::test(); } public static function test() { echo 'odbc::test()'; } } class anvadb extends odbcdb { public static function test() { echo 'anvadb::test()'; } } new schade;
Output for 5.3.0 - 5.3.13, 5.4.0 - 5.4.3
Warning: The magic method __callStatic() must have public visibility and be static in nbsnV on line 9 Parse error: syntax error, unexpected '}' in nbsnV on line 12
Process exited with code 255.

preferences:
163.41 ms | 1395 KiB | 25 Q