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.

This reports whether the value represents an integer; it does not guarantee that the value can be represented as a native PHP integer. Values whose magnitude exceeds PHP_INT_MAX are still reported as integer-like, even though the (int) cast that rest_sanitize_value_from_schema applies for the 'integer' type cannot round-trip them: an out-of-range numeric string saturates to PHP_INT_MAX or PHP_INT_MIN, while an out-of-range float is an undefined conversion in PHP that yields an arbitrary wrapped value. Likewise, a numeric value with a fractional part that is too large for the fraction to be represented as a float (greater than 2 ** 53) is reported as integer-like.


Source

Soon...