ID: 33010 User updated by: bart dot vanbrabant at zoeloelip dot be Reported By: bart dot vanbrabant at zoeloelip dot be -Status: Feedback +Status: Closed Bug Type: Zend Engine 2 problem Operating System: Linux 2.6.11 PHP Version: 5.0.4 New Comment:
Seems like this is fixed in 5.0.5-dev Previous Comments: ------------------------------------------------------------------------ [2005-05-11 23:06:05] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Can't reproduce it. ------------------------------------------------------------------------ [2005-05-11 22:58:06] bart dot vanbrabant at zoeloelip dot be Description: ------------ When using the __get and __set function and extending from a class the variable of the super class is treated static. The description isn't very clear but the source code explains it better. It seems like the super class of the sub class uses a static member or that the same object is used. Reproduce code: --------------- The code snippit is a bit to long (~50lines): http://zoeloelip.be:81/ea/tests/get_set.php.txt (the code) http://zoeloelip.be:81/ea/tests/get_set.php (the output) The server runs php 5.0.3 but on my machine with php 5.0.4 it also gives this error. Expected result: ---------------- super::__construct super: __get $test at super construction: 10 super: __get super: __set super: __get The value of 'test' is 11 ----------------------------------------- super::__construct sub: __get $test at super construction: 10 sub::__construct sub: __get $test at sub construction: 10 sub: __get sub: __set sub: __get The value of 'test' in sub::super is 11 Actual result: -------------- super::__construct super: __get $test at super construction: 10 super: __get super: __set super: __get The value of 'test' is 11 ------------------------------------------ sub::__construct sub: __get $test at sub construction: 11 sub: __get sub: __set sub: __get The value of 'test' in sub::super is 12 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33010&edit=1