- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.29, 5.6.8 - 5.6.13
- Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/NA77c on line 19
Process exited with code 255.
<?php
class testThis {
protected $_my_var = 'test';
public function getMyVar() {
return $this->_my_var;
}
public function test() {
$that = $this;
$thisTest = function($otherVar) use ($that) {
echo $that->getMyVar() . "\n";
echo $otherVar . "\n";
}
return $thisTest("Blabla");
}
}
$myClass = new testThis();
$myclass->test();