php - __get causes "Cannot assign by reference to overloaded object" -
php - __get causes "Cannot assign by reference to overloaded object" -
class { } class b { public function __get($name) { // nil } } // works $a = new a; $x = new stdclass(); $a->test =& $x; // fatal error: cannot assign reference overloaded object on line 21 $b = new b; $y = new stdclass(); $b->test =& $y;
how , why existence of magic getter cause error?
php overloading getter
Comments
Post a Comment