3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { private $value; public function __construct($value) { $this->value = $value; } public function Weeee() { return function() use ($this) { return str_repeat($this->value, 1000); }; } } $foo = new Foo(); echo $foo->Weeee();
Output for 5.3.0 - 5.5.1
Fatal error: Cannot use $this as lexical variable in /in/ofjuE on line 14
Process exited with code 255.