#30337 [Opn->Asn]: empty() does not return true on empty objects
| From: | derick@php.net | Date: | Wed, 06 Oct 2004 12:28:56 +0000 |
| Subject: | #30337 [Opn->Asn]: empty() does not return true on empty objects | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67184@lists.php.net to get a copy of this message | ||
ID: 30337
Updated by: derick@php.net
Reported By: jorma dot tuomainen at softera dot fi
-Status: Open
+Status: Assigned
Bug Type: Class/Object related
Operating System: Solaris
PHP Version: 5.0.1
-Assigned To:
+Assigned To: andi
New Comment:
Is this true Andi?
Previous Comments:
------------------------------------------------------------------------
[2004-10-06 14:19:26] jorma dot tuomainen at softera dot fi
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 this bug report at http://bugs.php.net/?id=30337&edit=1