3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { protected $x = 3; public function test() { return function () use ($this) { return $this->x; }; } } $foo = new Foo(); var_dump($foo->test());
Output for 5.3.0 - 5.4.10
Fatal error: Cannot use $this as lexical variable in /in/sa2Ui on line 8
Process exited with code 255.