Edit report at https://bugs.php.net/bug.php?id=64324&edit=1
ID: 64324 User updated by: dosergio at ig dot com dot br Reported by: dosergio at ig dot com dot br Summary: Why 0 == 'BOOK' ? Status: Open Type: Bug Package: *General Issues Operating System: all PHP Version: Irrelevant Block user comment: N Private report: N New Comment: *If the comparison WERE Previous Comments: ------------------------------------------------------------------------ [2013-02-28 14:54:24] dosergio at ig dot com dot br Description: ------------ If the comparison where 0 == '' that would make sense. But I am chanlenging some PHP expert to convince us that the result 1 is right for the comparison 0 == 'ANY STRING' Test script: --------------- if( 0 == 'TEST'){ echo "PHP thinks 0 is equal 'TEST'"; } Expected result: ---------------- 0 is not similar to a string that is NOT empty. this comparison should return FALSE. Actual result: -------------- it returns 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64324&edit=1