3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface CommandInterface { public function execute(); } class PriceTest implements CommandInterface { public function execute($i) { echo 'test ' . $i; return null; } } (new PriceTest)->execute('aslkjdfnlaksdf');
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of PriceTest::execute($i) must be compatible with CommandInterface::execute() in /in/1KhhB on line 7
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Fatal error: Declaration of PriceTest::execute() must be compatible with CommandInterface::execute() in /in/1KhhB on line 8
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/1KhhB on line 16
Process exited with code 255.