On Sun, Apr 6, 2025, at 7:47 PM, Ayesh Karunaratne wrote: >> On Mon, Apr 7, 2025 at 2:05 AM Bilge <bi...@scriptfusion.com> wrote: >> ... [snip] I suggest first proving there is a >> legitimate need. > > I did a quick GitHub search for a common pattern of accessing an array > value by using the `array_key_first` and `array_key_last` functions: > > ```php > $value = $arr[array_key_first($results)]; > ``` > > - `[array_key_first(`: over 3,700 results[^1] > - `[array_key_last(`: over 4,300 results[^2] > > All of these hits can benefit from the proposed `array_first` and > `array_last`.
Just registering that I am all for this RFC and look forward to using it. --Larry Garfield