polyfills/array-first-array-last

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

Installs: 1 354

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 2

Open Issues: 0

pkg:composer/polyfills/array-first-array-last

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

This package is auto-updated.

Last update: 2025-10-03 04:51:52 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.