3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface ICommand { public function execute(); } class Test { public function execute(string $val) : string { return 'asd ' . $val; } } $t = new Test(); echo $t->execute('sample val');
based on sno34
Output for 7.0.0 - 7.2.0
asd sample val
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/GqN28 on line 8
Process exited with code 255.