[wp-trac] [WordPress Trac] #57067: Replace certain `array_key_exists()` calls with `isset()` once PHP requirement is raised to 7.0+

WordPress Trac noreply at wordpress.org
Fri Nov 11 01:48:19 UTC 2022


#57067: Replace certain `array_key_exists()` calls with `isset()` once PHP
requirement is raised to 7.0+
-------------------------+-----------------------------
 Reporter:  flixos90     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  performance
-------------------------+-----------------------------

Comment (by flixos90):

 In [changeset:"54804" 54804]:
 {{{
 #!CommitTicketReference repository="" revision="54804"
 Editor: Improve performance of `WP_Theme_JSON` class by reducing usage of
 expensive array functions.

 In many scenarios array functions are more expensive than using simpler
 `for` or `foreach` loops.

 This changeset results in roughly 4% faster `wp_head` execution time for
 both block themes and classic themes. While this may seem like a small
 win, it is a worthwhile enhancement and only one part of several other
 little performance tweaks which are being worked on to improve performance
 of `theme.json` parsing further.

 Props aristath, desrosj, jrf, spacedmonkey.
 Fixes #56974.
 See #57067.
 }}}

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


More information about the wp-trac mailing list