note 29937 deleted from function.empty by betz

From: Date: Sat, 01 Mar 2003 16:12:53 +0000
Subject: note 29937 deleted from function.empty by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-44699@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.

« previous php.notes (#44699) next »