[wp-trac] [WordPress Trac] #31259: Replace array_shift() with current() where appropriate
WordPress Trac
noreply at wordpress.org
Sat Feb 7 19:13:59 UTC 2015
#31259: Replace array_shift() with current() where appropriate
----------------------------+-------------------------------------
Reporter: SergeyBiryukov | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: General | Version:
Severity: normal | Keywords: has-patch needs-testing
Focuses: performance |
----------------------------+-------------------------------------
Background: #31182
`array_shift()` recalculates array indexes, and can be slow on large
arrays. Most of the time, this is unnecessary, as we only use it to get
the first element of the array, and the array is never used later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31259>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list