3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { private $name = "test"; public $fn = null; function __construct() { $me = $this; $this->fn = function () use ($me) { echo $me->name; }; } } $t = new Test(); {$t->fn}();
Output for 5.3.0 - 5.4.31
Parse error: syntax error, unexpected '}' in /in/7vbeW on line 17
Process exited with code 255.