Re: [PHP-DEV] Chaining __set and __get in an expression

2004-07-20 Thread Jason Garber
Hello Curt, From http://us2.php.net/manual/en/language.operators.assignment.php "The value of an assignment expression is the value assigned. That is, the value of "$a = 3" is 3." I take this to mean that ($foo->a = 'bar') will always return 'bar' and that is a core feature of the languag

[PHP-DEV] Chaining __set and __get in an expression

2004-07-19 Thread Curt Zirzow
Given the class definition: false); function __set($name, $value) { echo "setting\n"; $this->x[$name] = 'foo'; // intentially ignore value } function __get($name) { echo "getting\n"; return $this->x[$name]; } } $foo = new Caller(); $b = $foo->a = 'bar'; echo "b is " .