3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $value; public function __construct($value) { $this->value = $value; } public function Weeee() { $that = &$this; return function() use ($that) { return str_repeat($this->value, 1000); }; } } $foo = new Foo(); echo $foo->Weeee();

preferences:
42.63 ms | 402 KiB | 5 Q