3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface a { public function aa(); } interface b extends a { public function bb(); } class aa implements a { public function aa() { echo 'aa'; } } class bb implements b { public function bb() { echo 'bb'; } } $aa = new aa(); $aa->aa(); $bb = new bb(); $bb->bb(); $aa->bb();
Output for 7.3.32 - 7.3.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Class bb contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (a::aa) in /in/ceAfZ on line 20
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; aa has a deprecated constructor in /in/ceAfZ on line 13 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bb has a deprecated constructor in /in/ceAfZ on line 20 Fatal error: Class bb contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (a::aa) in /in/ceAfZ on line 20
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Class bb contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (a::aa) in /in/ceAfZ on line 24
Process exited with code 255.

preferences:
211.49 ms | 405 KiB | 240 Q