This write-up covers the proposed PHP 8.5 array_first and array_last helpers, and I’m fully on board with it. It removes the awkward reset/end pointer side-effects and the verbosity of array_key_first/last + indexing. If it lands, it’s a tiny change that saves time and avoids subtle bugs.
You'll be taken to Amitmerchant to complete your purchase.