3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //interface I { // public function example(); //} class A { public function example(): int { } } class B extends A { public function example(): string { } // not compatible with A::example }
Output for 7.0.0 - 7.1.1
Fatal error: Declaration of B::example(): string must be compatible with A::example(): int in /in/n1q0G on line 11
Process exited with code 255.
Output for hhvm-3.15.4
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/n1q0G on line 7
Process exited with code 255.