3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function bar($x) } class Baz implements Foo { public function bar($x, $y=null) { echo($x.$y); } } (new Baz)->bar(4, 2);
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '}', expecting ';' or '{' in /in/rQpC7 on line 5
Process exited with code 255.

preferences:
171.1 ms | 1395 KiB | 61 Q