polyfills/array-first-array-last

PHP: Provides a user-land polyfill for `array_first` and `array_last` functions added in PHP 8.5.

v1.0.1 2025-04-23 15:50 UTC

This package is auto-updated.

Last update: 2025-04-23 15:54:42 UTC


README

Latest Stable Version License PHP Version Require

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.