note 118885 rejected from language.operators.comparison by cmb
| From: | cmb@php.net | Date: | Mon, 22 Feb 2016 19:42:29 +0000 |
| Subject: | note 118885 rejected from language.operators.comparison by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-205014@lists.php.net to get a copy of this message | ||
Note Submitter: joost at tieko dot nl
----
I don't know why, but php thinks 'A' is equal to 0
<?php
$VarA = 'A';
$VarB = 0;
if($VarA != $VarB)
{
echo $VarA . " != " . $VarB;
}else{
echo $VarA . " == " . $VarB;
}
?>
Output:
A == 0