Hi guys,
I am experienced in PHP or at least until today I was thinking so.
I am not sure what is it all about exactly. In my opinion the following code should not echo anything BUT IT DOES.
$cache = 'all';
if($cache == 0)
{
echo 'Execute something';
}
If I do the same but compare with 1,2,3,4.. or any other (int), comparison returns FALSE. Only when 0 (int) compared with string gives TRUE.
WHY? It definitely has something to do with type conversion but I can not figure it out.
When I compare with === (no type conversion) it seems to work as expected, but this does not answer my question.
Please throw a little more light on the subject.
Here is the reference