wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_is_integer › WordPress Function

Since5.5.0
Deprecatedn/a
rest_is_integer ( $maybe_integer )
Parameters:
  • (mixed) $maybe_integer The value being evaluated.
    Required: Yes
Returns:
  • (bool) True if an integer, otherwise false.
Defined at:
Codex:

Determines if a given value is integer-like.



Source

function rest_is_integer( $maybe_integer ) {
	return is_numeric( $maybe_integer ) && round( (float) $maybe_integer ) === (float) $maybe_integer;
}