Using is_numeric() instead of is_int() for request vars in PHP
So, I finished pulling my hair out trying to debug why is_int wasn’t correctly checking some request vars i was passing via a form. The php code was checking
if( is_int( $_REQUEST['var'] ) ) { //do something }
And always failed even if the var was an actual integer. Unfortunately it seems that PHP interprets request variables as strings. So using the is_numeric() function over comes this by checking of the string value is numeric. Now, it’s working great!
if( is_numeric( $_REQUEST['var'] ) ) { //do something }

Nice!
Yes, this is just what I was looking for.
@Russ