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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
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:
161.74 ms | 408 KiB | 5 Q