CTYPE_DIGIT
Check for numeric character(s)
SYNTAX
ctype_digit ( mixed $text ) : bool
PARAMETERS
text
The tested string.
Note: If an integer between -128 and 255 inclusive is provided, it is interpreted as the ASCII value of a single character (negative values have 256 added in order to allow characters in the Extended ASCII range). Any other integer is interpreted as a string containing the decimal digits of the integer.
RETURN
Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
EXAMPLES
1
true
2
48: 0
49: 1
50: 2
51: 3
52: 4
53: 5
54: 6
55: 7
56: 8
57: 9