PHPackages                             adhocore/php-polyfills - 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. adhocore/php-polyfills

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

adhocore/php-polyfills
======================

Miscellaneous polyfills for older PHP versions

v0.0.4(7y ago)8252MITPHP

Since Oct 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/adhocore/php-polyfills)[ Packagist](https://packagist.org/packages/adhocore/php-polyfills)[ RSS](/packages/adhocore-php-polyfills/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

adhocore/php-polyfills
----------------------

[](#adhocorephp-polyfills)

[![Latest Version](https://camo.githubusercontent.com/d0868fbc6c67df81ea825aeab174761d116024f8e09fb944b1a0e08d3c3b51ed/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6164686f636f72652f7068702d706f6c7966696c6c732e7376673f7374796c653d666c61742d737175617265)](https://github.com/adhocore/php-polyfills/releases)[![Travis Build](https://camo.githubusercontent.com/5fb8c5518ac7245f0b9c67715715747dc17892a2063a7c46a42d18600cf81df7/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6164686f636f72652f7068702d706f6c7966696c6c732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/adhocore/php-polyfills?branch=master)[![Scrutinizer CI](https://camo.githubusercontent.com/0e07a0da10adbb6bf9462994746ff4a73af3e2625f063713b6b3aaa3725ac2f8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6164686f636f72652f7068702d706f6c7966696c6c732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/adhocore/php-polyfills/?branch=master)[![Codecov branch](https://camo.githubusercontent.com/c02e458626c2f6f4422c0d3bb4110c4311409842d2f6c7842e64b402e174801f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6164686f636f72652f7068702d706f6c7966696c6c732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/adhocore/php-polyfills)[![StyleCI](https://camo.githubusercontent.com/d120b6cc51a6abf78f27dcb0eaf28cdeed056d3ed9fa0417636f77cfb8b73b5e/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130373535353333332f736869656c64)](https://styleci.io/repos/107555333)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Miscellaneous polyfills for older PHP versions. This library should run on any PHP5 versions or later. At the time being it contains some polyfills for PHP5.4 and PHP5.5. However it is being actively developed and new polyfills will be added from time to time.

Installation
============

[](#installation)

```
composer require adhocore/php-polyfills
```

Available Polyfills
===================

[](#available-polyfills)

Please see the native counterpart (linked below) for the documentation and usage.

### PHP5.5

[](#php55)

- **array\_column** - [native](http://php.net/array_column)

### PHP5.4

[](#php54)

- **http\_response\_code** - [native](http://php.net/http_response_code)
- **hex2bin** - [native](http://php.net/hex2bin)

*and more to come by*

Tests
=====

[](#tests)

The tests for this library runs with latest PHP version and asserts against the native implementation to ensure that the polyfills this library provides are compatible as much as possible.

To run the tests:

```
vendor/bin/phpunit
```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.6% 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 ~123 days

Total

4

Last Release

2851d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2908547?v=4)[Jitendra Adhikari](/maintainers/adhocore)[@adhocore](https://github.com/adhocore)

---

Top Contributors

[![adhocore](https://avatars.githubusercontent.com/u/2908547?v=4)](https://github.com/adhocore "adhocore (44 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

adhocorearray-columnmiscellaneous-polyfillsolder-php-versionsphpphp-polyfillsphp55polyfillpolyfillphplegacy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adhocore-php-polyfills/health.svg)

```
[![Health](https://phpackages.com/badges/adhocore-php-polyfills/health.svg)](https://phpackages.com/packages/adhocore-php-polyfills)
```

###  Alternatives

[php-ds/php-ds

Specialized data structures as alternatives to the PHP array

4119.8M177](/packages/php-ds-php-ds)[phpxmlrpc/polyfill-xmlrpc

A pure-php reimplementation of the API exposed by the native XML-RPC extension

12442.2k3](/packages/phpxmlrpc-polyfill-xmlrpc)[roxblnfk/unpoly

Remove unnecessary PHP polyfills

4139.1k20](/packages/roxblnfk-unpoly)

PHPackages © 2026

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