[wp-trac] [WordPress Trac] #64913: Code Quality: Replace is_integer() with is_int() for consistency
WordPress Trac
noreply at wordpress.org
Fri Mar 20 14:45:30 UTC 2026
#64913: Code Quality: Replace is_integer() with is_int() for consistency
------------------------------+-----------------------------
Reporter: Soean | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: coding-standards |
------------------------------+-----------------------------
[https://www.php.net/manual/en/function.is-integer.php is_integer()] is an
alias for [https://www.php.net/manual/en/function.is-int.php is_int()].
While they function identically, the WordPress Coding Standards and modern
PHP practices generally lean towards using the official function name
rather than its alias to maintain consistency across the codebase.
There is also a proposal to deprecate `is_integer()` in PHP 8.6,
[https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_integer see
RFC]
I am proposing to replace all occurrences of `is_integer()` with
`is_int()` throughout the WordPress Core. This is a non-breaking change as
the functionality remains exactly the same.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64913>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list