From 1c92b1baf595ebdb918eddcd88316fefd2628d3c Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 12 Jul 2025 12:20:20 +0900 Subject: [PATCH] Use array_key_first() and array_key_last() internally --- common/functions.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/functions.php b/common/functions.php index 7bb4911cf..84b923681 100644 --- a/common/functions.php +++ b/common/functions.php @@ -72,8 +72,7 @@ if (!function_exists('array_first')) */ function array_first_key(array $array) { - reset($array); - return key($array); + return array_key_first($array); } /** @@ -98,8 +97,7 @@ if (!function_exists('array_last')) */ function array_last_key(array $array) { - end($array); - return key($array); + return array_key_last($array); } /**