|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-05-14 02:27 UTC] design at apostolstudio dot com
Description:
------------
array('word')==array(0) -- return true
Reproduce code:
---------------
if(array('word')==array(0)) echo "ERROR";
Actual result:
--------------
ERROR
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 05:00:02 2025 UTC |
use === 'word' is converted to an integer for the comparison, and thus 0 == 0. try this code: if(array('word')===array(0)) echo "ERROR";