3v4l.org

run code in 300+ PHP versions simultaneously
<?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.0.15, 7.1.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.

preferences:
117.27 ms | 455 KiB | 5 Q