| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2008-07-12 17:54 UTC] felipe@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 05:00:01 2025 UTC | 
Description: ------------ I think there is a bug in the logic when comparing a string to int(0). I experience this bug on both MS windows and FreeBSD, on PHP 5.2.5 and PHP 5.2.6 and using Apache 2.0 / 1.3. Reproduce code: --------------- //Here is three ways of reproducing the same error. var_dump("test"==0); var_dump(("anotherTest"==0)); //... and finaly ... $bool=("abc"==0); var_dump($bool); Expected result: ---------------- I expect them all to return bool(false), I expect only "0"==0 to return true. Actual result: -------------- They all return bool(true), nomather what string i compare to 0