#31813 [Opn->Bgs]: Bogus empty()
| From: | tony2001@php.net | Date: | Wed, 02 Feb 2005 13:39:41 +0000 |
| Subject: | #31813 [Opn->Bgs]: Bogus empty() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73266@lists.php.net to get a copy of this message | ||
ID: 31813
Updated by: tony2001@php.net
Reported By: stach at chello dot pl
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: win32 (2000srv)
PHP Version: 4.3.10
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
"empty() returns FALSE if var has a non-empty and non-zero value."
http://php.net/empty
Previous Comments:
------------------------------------------------------------------------
[2005-02-02 14:28:18] stach at chello dot pl
Description:
------------
function empty returns true when the value of the variable is '0'
(string).
Reproduce code:
---------------
$d['id'][0] = '0';
var_dump(empty($d['id'][0]));
Expected result:
----------------
false
Actual result:
--------------
true
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31813&edit=1