note 94590 deleted from function.empty by danbrown

From: Date: Fri, 13 Nov 2009 13:52:18 +0000
Subject: note 94590 deleted from function.empty by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162868@lists.php.net to get a copy of this message
Note Submitter: dazweeja ---- I agree with Janci that the documentation could be clarified by stating that using empty() on inaccessible object properties will always return TRUE if the __isset overloading method is not declared. However, I think Janci's example makes the behavior in these cases seem less straightforward than it actually is. Using this __isset() magic function is sufficient for his example: <?php public function __isset($key) { return isset($this->_items[$key]); } ?>

« previous php.notes (#162868) next »