3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public $a = 'public'; protected $_b = 'protected'; private $_c = 'private'; } $method = function (){ global $x =& $this; $x = new stdClass; var_dump($this, $this->a);}; $a = new A; $method = $method->bindTo($a); $method(); var_dump($this);
Output for 5.3.0 - 5.4.3
Parse error: syntax error, unexpected '=', expecting ',' or ';' in /in/9dntj on line 9
Process exited with code 255.