Skip to content

[RFC] Implement array_first() and array_last()#18210

Merged
ndossche merged 1 commit into
php:masterfrom
ndossche:array-first-last-value
May 7, 2025
Merged

[RFC] Implement array_first() and array_last()#18210
ndossche merged 1 commit into
php:masterfrom
ndossche:array-first-last-value

Conversation

@ndossche

@ndossche ndossche commented Mar 31, 2025

Copy link
Copy Markdown
Member

@mvorisek

Copy link
Copy Markdown
Contributor

Love it, reset() is not only semantically wrong, but also does not work on function/expression result.

@javiereguiluz

This comment was marked as resolved.

Comment thread ext/standard/array.c Outdated
@ndossche

ndossche commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

Good points, thanks for the feedback and I've incorporated it in the RFC document.

@TimWolla TimWolla linked an issue Apr 1, 2025 that may be closed by this pull request
@ndossche ndossche marked this pull request as ready for review April 1, 2025 20:15
Comment thread ext/standard/tests/array/array_first_last.phpt Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two new functions array_first() and array_last()

4 participants