note 29937 added to function.empty

From: Date: Sat, 01 Mar 2003 16:11:12 +0000
Subject: note 29937 added to function.empty
Groups: php.notes 
Request: Send a blank email to php-notes+get-44697@lists.php.net to get a copy of this message
class crap { var $foo; function crap($what) { $this->setFoo($what); } function getFoo() { return $this->foo; } function setFoo($f) { $this->foo = $f; } } $me = new crap("barbarbar"); if (empty($me->getFoo())) { echo "Foo owns BAR"; } ^^^^^^^^^^^^ FAILS!!!!! Parse error: parse error, unexpected '(', expecting ')' in <path> on line 16 Line 16: if (empty($me->getFoo())) { please comment this. -- http://www.php.net/manual/en/function.empty.php http://master.php.net/manage/user-notes.php?action=edit+29937 http://master.php.net/manage/user-notes.php?action=delete+29937 http://master.php.net/manage/user-notes.php?action=reject+29937

« previous php.notes (#44697) next »