polyfills / array-first-array-last
PHP: Provides a user-land polyfill for `array_first` and `array_last` functions added in PHP 8.5.
Package info
github.com/PHP-Polyfills/array-first-array-last
pkg:composer/polyfills/array-first-array-last
v1.0.1
2025-04-23 15:50 UTC
Requires
- php: ^7.3 || ^8.0
Requires (Dev)
- symfony/phpunit-bridge: ^5.3|^6.0
Suggests
None
Provides
None
Conflicts
- php: ^8.5
Replaces
None
README
Provides user-land PHP polyfills for the array_first and array_last functions added in PHP 8.5.
Requires PHP 7.3 or later. Not supported on PHP 8.5 because these functions are natively implemented in PHP 8.5.
Installation
composer require polyfills/array-first-array-last
Usage
Simply use the array_first and array_last functions as if they were declared already.
Contributions
Contributions are welcome either as a GitHub issue or a PR to this repo.