#44990 [Opn->Bgs]: array('word')==array(0) -- true

From: Date: Wed, 14 May 2008 02:39:54 +0000
Subject: #44990 [Opn->Bgs]: array('word')==array(0) -- true
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-124971@lists.php.net to get a copy of this message
ID: 44990 Updated by: cellog@php.net Reported By: design at apostolstudio dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 5.2.6 New Comment: use === 'word' is converted to an integer for the comparison, and thus 0 == 0. try this code: if(array('word')===array(0)) echo "ERROR"; Previous Comments: ------------------------------------------------------------------------ [2008-05-14 02:27:10] design at apostolstudio dot com Description: ------------ array('word')==array(0) -- return true Reproduce code: --------------- if(array('word')==array(0)) echo "ERROR"; Actual result: -------------- ERROR ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44990&edit=1

« previous php.bugs (#124971) next »