3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.27, 5.4.0 - 5.4.17, 5.5.0 - 5.5.1
Fatal error: Cannot use $this as lexical variable in /in/ofjuE on line 14
Process exited with code 255.

preferences:
189.44 ms | 1395 KiB | 55 Q