3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { } class Test2 extends Test { public function __destruct() { parent::__destruct(); } } new Test2;
Output for 7.1.25 - 7.1.32, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Fatal error: Uncaught Error: Call to undefined method Test::__destruct() in /in/E4STq:7 Stack trace: #0 /in/E4STq(10): Test2->__destruct() #1 {main} thrown in /in/E4STq on line 7
Process exited with code 255.

preferences:
118 ms | 1496 KiB | 4 Q