$datemonth = (int) date("md");
if($datemonth == 0103){
echo "Match";
} else {
echo "Not a match";
}
I get Not a matchas a result. Is 0103 not 103 when compared as a whole? In this situation, I can use if($datemonth == 103)for the intended behavior. But why does logic fail? The leading zero does not matter in integers, right?
source
share