Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Ayesh
Copy link
Owner

@Ayesh Ayesh commented May 7, 2025

No description provided.

@Ayesh Ayesh force-pushed the array_first_last branch 8 times, most recently from 3c10365 to 933d80b Compare May 9, 2025 10:19
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)

Co-authored-by: Nicolas Grekas <[email protected]>
@Ayesh Ayesh force-pushed the array_first_last branch from 933d80b to fc474ff Compare June 23, 2025 16:13
@Ayesh Ayesh merged commit a640137 into 1.x Jun 28, 2025
2 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant