Glossary Term
rest_is_integer()
rest_is_integer() — 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.
Inputs: $maybe_integer (mixed): The value being evaluated.
Returns bool: True if an integer, otherwise false.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
