ID:               31813
 Updated by:       [EMAIL PROTECTED]
 Reported By:      stach at chello dot pl
-Status:           Closed
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: win32 (2000srv)
 PHP Version:      4.3.10


Previous Comments:
------------------------------------------------------------------------

[2005-02-02 14:42:07] stach at chello dot pl

I've found the explanation that empty() should work like this (however
pre 4.3.10 empty in case like that would  return false as I would
expect). 0 in a string is not an empty value, and in my opinion empty
should return false in case like this. But thats my thinkin :)

------------------------------------------------------------------------

[2005-02-02 14:39:40] [EMAIL PROTECTED]

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

------------------------------------------------------------------------

[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

Reply via email to