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() { $that = &$this; return function() use ($that) { return str_repeat($that->value, 1000); }; } } $foo = new Foo('stuff'); $func = $foo->Weeee() echo $func();
Output for 5.4.0 - 5.5.1
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/jFCij on line 23
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_ECHO in /in/jFCij on line 23
Process exited with code 255.