I get the feeling that the answer is 'no', because I sure can't find it...
Is there a PHP equivalent to the typeof operator?
For instance, I want to know if $bar is an integer or not...
function foo($bar) {
if (typeof($bar) == integer) {
// do some stuff
} else {
echo('gimme an integer!');
exit;
}
} // end foo
Thanks in advance. I know this is a dumb noob question - it just seems like if this method doesn't exist, somebody's gotta have a hack for it by now..