3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public function bar() { return function() use ($this) { echo "in closure\n"; } } } $foo = new Foo();
Output for 5.3.0 - 5.4.21
Fatal error: Cannot use $this as lexical variable in /in/G28oE on line 5
Process exited with code 255.