Since it doesn't really matter if we send '1'
or 1
to MySQL, or in many other cases in PHP,
I find myself constantly checking like:
if(ctype_digit($val) || is_int($val)){
// Pass
}
Basically I want to make sure it is an integer, but it doesn't matter if it's represented as string or int.
So I thought:
Maybe there is an equivalent PHP function that does both at the same time that I'm not aware of? please let me know if there is.