#48468 [NEW]: empty function confusing

From: Date: Thu, 04 Jun 2009 06:44:50 +0000
Subject: #48468 [NEW]: empty function confusing
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2337@lists.php.net to get a copy of this message
From: heikki dot leppanen at extendeddisc dot com Operating system: windows PHP version: Irrelevant PHP Bug Type: Translation problem Bug description: empty function confusing Description: ------------ class A { var $vars = {'a'=>'aa', 'b'=>'bb'}; function __get ($name) { return $this->vars[$name]; } } $x = new A(); if (empty($this->a)) echo "this is empty"); else echo "this in not empty"); For me it looks a bug! Any experience? Reproduce code: --------------- --- From manual page: function.empty --- Expected result: ---------------- This is not empty Actual result: -------------- RESULT: this is empty -- Edit bug report at http://bugs.php.net/?id=48468&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48468&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48468&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48468&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48468&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48468&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48468&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48468&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48468&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48468&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48468&r=support Expected behavior: http://bugs.php.net/fix.php?id=48468&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48468&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48468&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48468&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48468&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48468&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48468&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48468&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48468&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48468&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48468&r=mysqlcfg

« previous php.doc.bugs (#2337) next »