functions is_int() and is_float() check for specific data types.
<?php $a = 123; echo "is_int($a) = " . (is_int($a) ? "true" : "false") . "\n"; $a = '123'; echo "is_int($a) = " . (is_int($a) ? "true" : "false") . "\n"; ?>