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