3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $o = new stdClass; $GLOBALS['this'] = $o; var_dump($this); global $this; var_dump($this);
based on Zbkg6
Output for 7.1.0 - 7.2.0
Fatal error: Cannot use $this as global variable in /in/PseYN on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20
object(stdClass)#1 (0) { } object(stdClass)#1 (0) { }
Output for 5.3.18 - 5.6.28
Fatal error: Cannot re-assign $this in /in/PseYN on line 5
Process exited with code 255.