3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function f1() { return 'f1'; } protected funtion f2() { return 'f2'; } private funtion f3() { return 'f3'; } public function __call($method, $args) { return call_user_func_array([$this, $method], $args); } public function __callStatic($method, $args) { $me = new static; return call_user_func_array([$me, $method], $args); } } $c = new C; $c->f1(); $c->f2(); $c->f3(); C::f1(); C::f2(); C::f3();
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'funtion' (T_STRING), expecting variable (T_VARIABLE) in /in/75TIp on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/75TIp on line 4
Process exited with code 255.

preferences:
193.89 ms | 1395 KiB | 61 Q