array_first and array_last are not the kind of features that sell a release, but they are exactly the kind I like. They remove tiny helper functions that too many PHP codebases already carry around like loose change in a drawer.
PHP 8.5 adds new array_first and array_last functions. The value is not that getting the first or last item was impossible before. It was always possible. The problem is that the common ways to do it are either a bit noisy, a bit easy to get wrong with keys, or wrapped in local helpers with slightly different names and behaviours.
Small standard-library additions matter because they reduce local vocabulary. If every project has first, first_value, array_first_item, or a collection helper just to do this, readers have to learn one more project-specific convention. A native function gives the boring operation a boring name, which is usually what I want.
This is also a good reminder that language releases do not have to be made only of big ideas. Sometimes the most welcome change is the one that deletes three lines from a utility class and makes the intent obvious. Not every feature needs a parade. Some can just quietly make the code less irritating.
