3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Asd { public function qwerty(int $q): array; } class Qwertyasd implements Asd { public function qwerty(int $q): array { return 123; } } (new Qwertyasd)->qwerty(25);
based on l0oC9
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Return value of Qwertyasd::qwerty() must be of the type array, integer returned in /in/QGGt4:12 Stack trace: #0 /in/QGGt4(16): Qwertyasd->qwerty(25) #1 {main} thrown in /in/QGGt4 on line 12
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/QGGt4 on line 5
Process exited with code 255.