Skip to content

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

License

Notifications You must be signed in to change notification settings

ChristiaanBye/polyfill-each

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polyfill each()

This package returns the legacy each() function which has been removed in PHP 8.0. 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

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

Installation

Installation can be easily done using Composer:

composer require christiaanbye/polyfill-each

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages