Except that "1e4" is numeric.
Digits only? There's more than one solution. You could use strspn(), for example, to grab all the digits from the start of the string, and then look to see if you ended up grabbing the entire string. Or you could use preg_match(), with an expression of /\D/: the function would return true if the string contained something other than a digit. Or ...