3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { protected $_b = 'protected'; private $_c = 'private'; } $method = function (){ $this = new stdClass; var_dump($this->_b, $this->_c);}; $a = new A; $method = $method->bindTo($a); $method();
Output for 5.3.0 - 5.4.3
Fatal error: Cannot re-assign $this in /in/MBmPl on line 8
Process exited with code 255.