PHP: Best way to check if input is a valid number?

ctype_digit was built precisely for this purpose.

Leave a Comment