From d0bf82fc052ee2b29df32fd6917955d7e6c38748 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Sat, 1 Nov 2025 10:20:04 +0100 Subject: [PATCH 1/2] array_unshift: Add fast optimized case for packed arrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Packed arrays are likely common in this case, as with array_shift which already has a similar optimization. For the following benchmark: ```php Date: Thu, 6 Nov 2025 18:49:07 +0100 Subject: [PATCH 2/2] [ci skip] UPGRADING --- UPGRADING | 1 + 1 file changed, 1 insertion(+) diff --git a/UPGRADING b/UPGRADING index b0c30bc714576..9733e374aec55 100644 --- a/UPGRADING +++ b/UPGRADING @@ -125,4 +125,5 @@ PHP 8.6 UPGRADE NOTES - Standard: . Improved performance of array_fill_keys(). + . Improved performance of array_unshift(). . Improved performance of array_walk().