3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test { function a() { echo 'a'; } function __destruct() { echo 'b'; } } test::__destruct();
based on ftR7Y
Output for 7.0.0 - 7.1.10
Fatal error: Uncaught Error: Non-static method test::__destruct() cannot be called statically in /in/B6of6:12 Stack trace: #0 {main} thrown in /in/B6of6 on line 12
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Non-static method test::__destruct() cannot be called statically in /in/B6of6 on line 12
Process exited with code 255.
Output for 4.3.0 - 4.4.9
b