3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Asd { public function qwerty(int $q): array; } class Qwerty implements Asd { public function qwerty($q) { return 123; } }
based on d44d2
Output for 7.0.0 - 7.2.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Qwerty has a deprecated constructor in /in/Z9esB on line 8 Fatal error: Declaration of Qwerty::qwerty($q) must be compatible with Asd::qwerty(int $q): array in /in/Z9esB on line 8
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/Z9esB on line 5
Process exited with code 255.