note 83367 deleted from language.oop5.overloading by danielc

From: Date: Sat, 19 Jul 2008 23:09:14 +0000
Subject: note 83367 deleted from language.oop5.overloading by danielc
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141783@lists.php.net to get a copy of this message
Note Submitter: el.pescado Reason: 1 ---- @durist at frii dot com: It is not a bug. "Variables" managed by __set & __get aren't really variables - so there's no way get_object_vars could know them. Example with array is simple, but I can imagine more sophisticated scenarios, eg. __get could retrieve data from a database, or even you could write: <?php public function __get($name) { return md5($name); } ?> If you were correct, it would mean that get_object_vars should return infinite array of "member variables". get_object_vars returns real variables. If you define a __set method that puts your data into array, you don't create a new variable, you just append some keys into an array;) Hope I made myself clear;)

« previous php.notes (#141783) next »