Re: Re: [PHP5]__get, __set and isset()
| From: | Marek Kilimajer | Date: | Wed, 01 Sep 2004 17:35:49 +0000 |
| Subject: | Re: Re: [PHP5]__get, __set and isset() | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195427@lists.php.net to get a copy of this message | ||
Catalin Trifu wrote:
__isset magic function would have to support also arrays: if(isset($a->foo['bar'])) .... So the function definition would have to be bool __isset(string varname [, mixed index [, mixed ...]])Hi,Is this really a bug. I think not. There is no variable $o->a or $a->b in the class OOthere is only the variable $elem and $a and $b is a member of that arraySo ... The fact that PHP5 provides __set and __get magicfunctions does not mean that the actual variables exist with that particular name in the class ?Perhaps it would be nice to have a __isset magic function ?