3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface CommandInterface() {} abstract class AbstractCommand implements CommandInterface {} interface PrefixableCommandInterface {} abstract class PrefixableCommand extends AbstractCommand implements PrefixableCommandInterface { } class StringSet extends PrefixableCommand {} class Tester { public function executeCommand(CommandInterface $command) {} } $t = new Tester(); $t->executeCommand(new StringSet);
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.20, 5.5.0 - 5.5.4
Parse error: syntax error, unexpected '(', expecting '{' in /in/YDJQH on line 2
Process exited with code 255.

preferences:
184.03 ms | 1395 KiB | 61 Q