From: jorma dot tuomainen at softera dot fi Operating system: Solaris PHP version: 5.0.1 PHP Bug Type: Class/Object related Bug description: empty() does not return true on empty objects
Description: ------------ Empty() does not return true on empty objects. My understanding is that object that does not have methods or properties is empty(am I wrong?). Someone reported same thing on PHP 5 RC2 and it's still open w/o comments http://bugs.php.net/bug.php?id=28502 Reproduce code: --------------- <?php class nuthin { } $bar=new nuthin; $foo=new stdClass; echo empty($bar); echo empty($foo); ?> Expected result: ---------------- 11 Actual result: -------------- nothing aka empty page -- Edit bug report at http://bugs.php.net/?id=30337&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30337&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30337&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30337&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30337&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30337&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30337&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30337&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30337&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30337&r=support Expected behavior: http://bugs.php.net/fix.php?id=30337&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30337&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30337&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30337&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30337&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30337&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30337&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30337&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30337&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30337&r=mysqlcfg