3v4l.org

run code in 500+ PHP versions simultaneously
<?php // defined before the parent class : no error class y extends x {} abstract class x { abstract function foo(); } // defined after the parent class : error class y2 extends x {} ?>
Output for 8.2.0 - 8.2.27, 8.3.0 - 8.3.16, 8.4.1 - 8.4.3
Fatal error: Class y2 contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (x::foo) in /in/mUEsK on line 11
Process exited with code 255.

preferences:
56.39 ms | 689 KiB | 3 Q