You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #525 [PHP 8.5] Add array_first and array_last (Ayesh)
This PR was merged into the 1.x branch.
Discussion
----------
[PHP 8.5] Add `array_first` and `array_last`
Adds polyfills for the PHP 8.5's `array_first` and `array_last` functions.
The polyfills would have been a bit cleaner if we used the `array_key_first` and `array_key_last` functions, but they were added in PHP 7.3, and are not available on PHP 7.2.
This adds the same tests from php-src patch.
- [RFC: `array_first()` and `array_last()`](https://wiki.php.net/rfc/array_first_last)
- [php-src commit](php/php-src@168343d)
- [PHP.Watch polyfill for PHP 8.0+](https://php.watch/versions/8.5/array_first-array_last)
Commits
-------
fc474ff [PHP 8.5] Add `array_first` and `array_last`
0 commit comments