3v4l.org

run code in 200+ php & hhvm versions
<?php class Foo { function __construct() { echo "construct\n"; } function __destruct() { echo "destruct\n"; } } new Foo(exit());
Output for 5.0.0 - 7.2.6
destruct
Output for 4.3.0 - 4.4.9