[wp-trac] [WordPress Trac] #63853: Add PHP 8.5 compat array functions: `array_first` and `array_last`
WordPress Trac
noreply at wordpress.org
Wed Aug 27 07:44:18 UTC 2025
#63853: Add PHP 8.5 compat array functions: `array_first` and `array_last`
-------------------------------------------------+-------------------------
Reporter: TobiasBg | Owner: jorbin
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.9
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: php85 has-patch has-unit-tests | Focuses: php-
commit | compatibility
-------------------------------------------------+-------------------------
Comment (by TobiasBg):
@Soean: I think this was a deliberate choice to save a function call, see
https://github.com/WordPress/wordpress-
develop/pull/9556#discussion_r2289844485
It's the same functionality, minus a otherwise-duplicated `empty()` check,
see https://github.com/WordPress/wordpress-develop/blob/6.8.2/src/wp-
includes/compat.php#L310-L312
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63853#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list