Voting

: min(zero, two)?
(Example: nine)

The Note You're Voting On

petepostma at gmail dot spam dot com
12 years ago
There is a versa to the vice of this int only type check.

is_int( $integer_type) will only return true, if the TYPE is int, not the value
ctype_digit( $string_type) will only return true if the TYPE is string, and its value is INT

therefore:
return ( is_int($value) || ctype_digit($value) );

<< Back to user notes page

To Top