3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Core { function Core() { if ($_GET['hi']) { exit('hi'); } } function __destruct() { global $core; if (is_object($core)) { // phpinfo(); echo 'haha'; } else { var_dump($core); echo 'fuck'; } } } $_GET['hi'] = 1; $core = new Core;
based on ovp3m
Output for 7.0.0 - 7.1.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Core has a deprecated constructor in /in/i7CTd on line 3 hiNULL fuck
Output for 5.0.0 - 5.6.28
hiNULL fuck
Output for 4.3.0 - 4.4.9
hi