3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface invokable { public function __invoke(int $int) : string; } class Foo implements invokable { public function __invoke(int $int) : string { return 12; } } $foo = new Foo();
based on q0GLm
Output for 7.0.0 - 7.3.0alpha1
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/PY5s7 on line 5
Process exited with code 255.