3v4l.org

run code in 300+ PHP versions simultaneously
<?php class theParent { function derp() { echo 'Everything went better than expected...'; } } class ParentChild extends theParent { function derp() { die('DONT DO THIS'); } } class Child extends ParentChild { function derp() { // dont parent::derp(); parent::parent::derp(); } }
Output for 8.1.23 - 8.1.28, 8.2.10 - 8.2.18, 8.3.0 - 8.3.6
Output for 5.4.0 - 5.4.7
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) in /in/VkKQ7 on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.17
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /in/VkKQ7 on line 15
Process exited with code 255.

preferences:
70.56 ms | 401 KiB | 53 Q