ID: 9478 Updated by: stas Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Bogus Bug Type: Math related Assigned To: Comments: Use === for exact comparison. == is 'numeric' comparison. Previous Comments: --------------------------------------------------------------------------- [2001-02-27 08:59:02] [EMAIL PROTECTED] ### CODE ### $Flag = 0; if ( $Flag == 'N' ) echo "1"; else echo "2"; ### END ### Result: 1 If the $Flag is integer value and 'N' non integer, why this operation gives true as the result? This is different types 0 and 'N', but if the programm can compare this values, it will be better to give "false"! Can you explane this ? --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9478&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]