ID: 28176 Updated by: [EMAIL PROTECTED] Reported By: benjcarson at digitaljunkies dot ca -Status: Open +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 5CVS-2004-04-27 (dev) 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 This is correct behavior, isset() does not call the __get and __set handlers. Previous Comments: ------------------------------------------------------------------------ [2004-04-27 03:57:42] benjcarson at digitaljunkies dot ca Description: ------------ isset() returns false for variables that are returned using the __get() method, even though the variables are set and their values are returned properly. Reproduce code: --------------- <?php class Foo { var $arr; function __get($var) { return $this->arr[$var]; } } class Bar { var $var; function __get($tmp) { return $this->var; } } $f = new Foo(); $f->arr["key"] = "val"; var_dump($f->key); // Value returned correctly var_dump(isset($f->key)); // isset() disagrees $b = new Bar(); $b->var = "blah"; var_dump($b->dummy); // Value returned correctly var_dump(isset($b->dummy)); // isset() returns false ?> Expected result: ---------------- string(3) "val" bool(true) string(4) "blah" bool(true) Actual result: -------------- string(3) "val" bool(false) string(4) "blah" bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28176&edit=1