The function `is_numeric()` also allows hexadecimal, binary, octal values and also exponential parts. I think however you only want to allow numbers. In that case `ctype_digit()` is a better choice.