deviscoding/php-polyfill

PHP Polyfill functions, interfaces, and classes in a PHP 7.0 friendly library for legacy applications.

Installs: 12

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/deviscoding/php-polyfill

1.85.2 2026-02-03 13:19 UTC

This package is auto-updated.

Last update: 2026-02-03 15:56:30 UTC


README

Polyfill code for commonly used PHP functions not present in older versions, in a library that is PHP 7.0 friendly for legacy applications.

Many polyfill functions are from symfony/polyfills and are attributed in the PHPdoc to their contributors.

Polyfills Included

Name Type PHP Version
array_key_first Function 7.3
array_key_last Function 7.3
is_countable Function 7.3
get_debug_type Function 8.0
str_contains Function 8.0
str_starts_with Function 8.0
str_ends_with Function 8.0
Stringable Interface 8.0
ValueErrror Class 8.0
array_is_list Function 8.1
json_validate Function 8.3
array_first Function 8.5
array_last Function 8.5

Versioning

The minor version indicates the latest PHP version from which some functionality is included.

The major version can be used to match compatibility with a specific PHP version:

  • All 1.x releases will maintain compatibility with PHP 7.0