note 104092 deleted from function.isset by thiago

From: Date: Mon, 23 May 2011 14:12:27 +0000
Subject: note 104092 deleted from function.isset by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-179962@lists.php.net to get a copy of this message
Note Submitter: Paul Lashbrook ---- a correction to the below comment. if you use the __isset() method within the class you can use the isset() function in your code still. <?php class T { function __isset($att) { $props = get_object_vars($this); return array_key_exists($att, $props); } } $x = new T(); $x->foo_exists = 4; var_dump(isset($x->foo_exists)); // TRUE var_dump(isset($x->bar_exists)); // FALSE ?>

« previous php.notes (#179962) next »