Quote:
Originally Posted by blackmonsters
Correct, quoted 5 is not type integer; the variable type must match for exact match.
And that pretty much sums up what the thread is about.
Doing the correct test on the returned value, which this time requires type.
|
Remember that it can also be cast:
$var = '5';
$result = ((int) $var === 5) ? true : false;
This will also result in a true evaluation, although it's not readily apparent to junior-level guys.