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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -