WordPress at a glance
function is not described

rest_is_integer() WP 5.5.0

Determines if a given value is integer-like.

No Hooks.

Return

true|false. True if an integer, otherwise false.

Usage

rest_is_integer( $maybe_integer );
$maybe_integer(mixed) (required)
The value being evaluated.

Changelog

Since 5.5.0 Introduced.

Code of rest_is_integer() WP 5.7.2

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