Originally posted by rehfeld
gettype()
its faster to just test for the type your expecting though, for example
if (is_string($foo)) {
}
theres a specific is_****() function for every data type
Yea, I can see why that might be, if you type:
$type = gettype($number);
if($type == "string")
{
echo $number;
}
You're just doing the same thing, it sort of limits the use of that function.