OK, I've read some guides, and I'm still a bit confused as to the purpose of this.
I've come across a bit of code in a project that I've picked up from a previous developer, which has items like this all across it:
if (is_numeric($var) && ((int)$var == $var){
What is the purpose of typecasting $var to int in the second check? The whole thing is going to evaluate false if $var is not numeric, or at least a string that can evaluate to numeric. And even if $var is a string and not a number, the second check is going to evaluate to true, again, if the string can evaluate to a number.
Wouldn't it make more sense to just use is_numeric() and leave it at that?