- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.17
- Parse error: syntax error, unexpected '&' in /in/Ir3Hd on line 9
Process exited with code 255.
<?php
class Foo
{
private $bar = 'baz';
public function getBar()
{
return &$this->bar;
}
}
//$reader = function & ($object, $property) {
// $value = & Closure::bind(function & () use ($property) {
// return $this->$property;
// }, $object, $object)->__invoke();
//
// return $value;
//};
$foo = new Foo();
//$bar = & $reader($foo, 'bar');
//$bar = 'tab';
//var_dump($foo);
echo $foo->getBar();