3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cm404 { public $str = ''; function init() { if (isset($GLOBAL['ryat'])) { exit('hi'); } unset($GLOBAL['hi']); } function __destruct() { global $obj; // if(!is_object($obj)) { // $obj = new cm404(); // } echo "hi, $GLOBAL[hi]\n"; var_dump($obj); } } function _get() { // var_dump($obj); } //$_GET['ryat'] = 1; $hi = 'ryat'; $obj = new cm404(); $obj->init(); $hi = 'cm404';
Output for git.master, git.master_jit
Warning: Undefined variable $GLOBAL in /in/Gvjks on line 11 Warning: Undefined variable $GLOBAL in /in/Gvjks on line 19 Warning: Trying to access array offset on value of type null in /in/Gvjks on line 19 hi, NULL
Output for rfc.property-hooks
Warning: Undefined variable $GLOBAL in /in/Gvjks on line 11 Warning: Undefined variable $GLOBAL in /in/Gvjks on line 19 Warning: Trying to access array offset on null in /in/Gvjks on line 19 hi, NULL

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.91 ms | 401 KiB | 8 Q