3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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();
based on S1h14
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; 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.3.19 - 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.