ID: 26441 Updated by: [EMAIL PROTECTED] Reported By: chernyshevsky at hotmail dot com -Status: Open +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: Win32 PHP Version: 5.0.0b2 (beta2) New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php .. Previous Comments: ------------------------------------------------------------------------ [2003-11-28 01:13:50] chernyshevsky at hotmail dot com Description: ------------ When __set() returns an element of a member array, it seems to corrupt the array. Works as expected when "return" is removed. Reproduce code: --------------- class Test { var $values; function __construct() { $this->values = array(); } function __set($name, $value) { return $this->values[$name] = $value; } function __get($name) { return $this->values[$name]; } }; $a = new Test(); $a->greeting = "Hello"; echo $a->greeting; Expected result: ---------------- Hello Actual result: -------------- 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26441&edit=1