Check if integer _value_


/ Published in: PHP
Save to your folder(s)

PHP has is_numeric, and is_int, but this is a not a complete set. Is_numeric doesn't maintain that the value is strictly an integer, and is_int 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.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.