PHPackages                             christiaanbye/polyfill-each - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. christiaanbye/polyfill-each

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

christiaanbye/polyfill-each
===========================

PHP 8.x polyfill for the removed each() function

1.0.1(2y ago)521.0k↓34.7%1MITPHPPHP ^5.3 || ^7.0 || ^8.0

Since Aug 4Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ChristiaanBye/polyfill-each)[ Packagist](https://packagist.org/packages/christiaanbye/polyfill-each)[ RSS](/packages/christiaanbye-polyfill-each/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (1)

Polyfill each()
===============

[](#polyfill-each)

This package returns the legacy `each()` function which has been [removed in PHP 8.0](https://www.php.net/manual/en/migration80.incompatible.php). This can be useful when working with legacy code or with end-of-life packages which still make use of the `each()` function.

It is therefore not really a polyfill but rather a shim as it provides legacy functionality to modern-day software instead of vice versa. I have still chosen the name polyfill as this term is usually top of mind irrespective of the direction of the port.

Prerequisites
-------------

[](#prerequisites)

- PHP 5.3 or later, though the shim will only take effect in PHP 8.x

Installation
------------

[](#installation)

Installation can be easily done using Composer:

```
composer require christiaanbye/polyfill-each
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~745 days

Total

2

Last Release

1002d ago

PHP version history (2 changes)1.0.0PHP ^5.4 || ^7.0 || ^8.0

1.0.1PHP ^5.3 || ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6db360f9e2881d726d2850884979551d5495b0722b05e678e720c43c72eb06ff?d=identicon)[Christiaan Bye](/maintainers/Christiaan%20Bye)

---

Top Contributors

[![ChristiaanBye](https://avatars.githubusercontent.com/u/1265576?v=4)](https://github.com/ChristiaanBye "ChristiaanBye (6 commits)")

---

Tags

compatibilitypolyfillshimphpeach

### Embed Badge

![Health badge](/badges/christiaanbye-polyfill-each/health.svg)

```
[![Health](https://phpackages.com/badges/christiaanbye-polyfill-each/health.svg)](https://phpackages.com/packages/christiaanbye-polyfill-each)
```

###  Alternatives

[symfony/polyfill-mbstring

Symfony polyfill for the Mbstring extension

7.8k1.2B515](/packages/symfony-polyfill-mbstring)[symfony/polyfill-php72

Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions

4.7k674.7M31](/packages/symfony-polyfill-php72)[symfony/polyfill-php73

Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions

2.4k581.8M67](/packages/symfony-polyfill-php73)[symfony/polyfill-php70

Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions

3.2k200.0M56](/packages/symfony-polyfill-php70)[symfony/polyfill-intl-icu

Symfony polyfill for intl's ICU-related data and classes

2.6k251.4M96](/packages/symfony-polyfill-intl-icu)[symfony/polyfill-iconv

Symfony polyfill for the Iconv extension

1.8k352.7M84](/packages/symfony-polyfill-iconv)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
