- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.14
- Fatal error: Cannot use $this as lexical variable in /in/jsksv on line 7
Process exited with code 255.
<?php
class abc{
public function func() {
$x = function() use ($this) {
$this->bcg();
};
$x();
}
public function bcg() {
echo 'HERRO';
}
}
(new abc)->func();