3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __call($name, $args){ echo "__call " . $name . PHP_EOL; } public static function __callStatic($name, $args) { echo "__callStatic " . $name . PHP_EOL; } public function make_call() { $this::ted(); } } $x = new foo(); $x->make_call() foo::sam();
Output for 5.4.0 - 5.4.8
Parse error: syntax error, unexpected 'foo' (T_STRING) in /in/3Jt2R on line 20
Process exited with code 255.
Output for 5.3.0 - 5.3.18
Parse error: syntax error, unexpected T_STRING in /in/3Jt2R on line 20
Process exited with code 255.

preferences:
173.88 ms | 1399 KiB | 35 Q