/ Published in: PHP
PHP has isnumeric, and isint, but this is a not a complete set. Isnumeric doesn't maintain that the value is strictly an integer, and isint returns true if the TYPE of the variable is an integer. This returns whether a variable holds an integer value as either a true int, or as a string.
Expand |
Embed | Plain Text
/** * Check if a number is a counting number by checking if it * is an integer primitive type, or if the string represents * an integer as a string */ function is_int_val($data) { } return false; }
Comments
Subscribe to comments
You need to login to post a comment.

Used. Thanks for sharing.