[wp-trac] [WordPress Trac] #62558: Add PHP 8.4 compat array functions: `array_find`, `array_find_key`, `array_any` and `array_all`

WordPress Trac noreply at wordpress.org
Fri Feb 7 18:53:11 UTC 2025


#62558: Add PHP 8.4 compat array functions: `array_find`, `array_find_key`,
`array_any` and `array_all`
-------------------------------------------------+-------------------------
 Reporter:  Soean                                |       Owner:  desrosj
     Type:  feature request                      |      Status:  closed
 Priority:  normal                               |   Milestone:  6.8
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch php84 add-to-field-guide   |     Focuses:  php-
  commit                                         |  compatibility
-------------------------------------------------+-------------------------
Changes (by desrosj):

 * owner:  (none) => desrosj
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59783" 59783]:
 {{{
 #!CommitTicketReference repository="" revision="59783"
 General: Introduce polyfills for new array related functions in PHP 8.4.

 PHP 8.4 introduced four new functions to provide a common way to more
 easily perform common operations on arrays.

 - `array_find()`: https://www.php.net/manual/en/function.array-find.php
 - `array_find_key()`: https://www.php.net/manual/en/function.array-find-
 key.php
 - `array_all()`: https://www.php.net/manual/en/function.array-all.php
 - `array_any()`: https://www.php.net/manual/en/function.array-any.php

 These functions are now polyfilled making them available on all supported
 versions of PHP (currently 7.2+).

 Props Soean, swissspidy, TobiasBg, ayeshrajans, mukesh27, joemcgill.
 Fixes #62558.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62558#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list