- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.21
- Fatal error: Method Foo::__set() cannot take arguments by reference in /in/HQX0E on line 14
Process exited with code 255.
<?php
class Foo
{
protected $bar;
public function &__get($property)
{
return $this->bar;
}
public function __set($property, &$value)
{
$this->bar = &$value;
}
}
$test = new Foo;
$a = 0;
$test->bar = $a;
$a++;
echo $test->bar;