PHPackages                             unity-magento-git-hub-user/php-future - 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. [Security](/categories/security)
4. /
5. unity-magento-git-hub-user/php-future

ActiveLibrary[Security](/categories/security)

unity-magento-git-hub-user/php-future
=====================================

Polyfill new (5.6+) features into old (5.4+) versions of PHP

1.0.0(8y ago)01681MITPHP

Since Jun 30Pushed 8y agoCompare

[ Source](https://github.com/UnityMagentoGitHubUser/php-future)[ Packagist](https://packagist.org/packages/unity-magento-git-hub-user/php-future)[ RSS](/packages/unity-magento-git-hub-user-php-future/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

php-future
==========

[](#php-future)

[![Build Status](https://camo.githubusercontent.com/1bc1c52e4b77aa6517fad5b2a5167797ea65c0dd9d6d0d88fbf09bbec6d10494/68747470733a2f2f7472617669732d63692e6f72672f7361726369737a6577736b692f7068702d6675747572652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sarciszewski/php-future)

This library backports some new features into old versions of PHP.

This **MIT Licensed** project is produced and maintained for the good of the PHP developer community.

WARNING ABOUT APPLICATION SECURITY
----------------------------------

[](#warning-about-application-security)

This should ONLY be used in the case that you cannot upgrade PHP for specific reasons within your business rules. For best application security you should always run the latest version of PHP where ever possible. This is intended as a stop gap for those that cannot upgrade and can be used while working toward upgrading to the latest version.

ATTENTION PHP 5.2 / 5.3 USERS
-----------------------------

[](#attention-php-52--53-users)

As a general rule, we do not provide support for [any unsupported versions of PHP](http://php.net/eol.php). This means 5.4.x as of this writing.

If your operating system supports a 5.3.x version that is EOL'd (e.g. PHP 5.3.10 on Ubuntu 12.04 has security fixes backported), we will make exceptions. **The purpose of this library is not to encourage complacency and insecurity. Patch your systems.**

We do not support PHP 5.2.x anywhere. Please upgrade to a newer version of PHP.

Features polyfilled by this library
-----------------------------------

[](#features-polyfilled-by-this-library)

- PHP 5.4
    - N/A
- PHP 5.5
    - `array_column()`
    - `boolval()`
    - `hash_pbkdf2()`
    - `openssl_pbkdf2()`
- PHP 5.6
    - `hash_equals()`
- PHP 7.0
    - N/A

See [wishlist.txt](wishlist.txt) for features we will be providing as time goes on. **To add to this list, either send a pull request, a [tweet](https://twitter.com/vodooKobra), or [an email](https://scott.arciszewski.me/contact) and we'll consider it for inclusion.**

### Out of scope:

[](#out-of-scope)

- Password API - Go directly to [https://github.com/ircmaxell/password\_compat](https://github.com/ircmaxell/password_compat) for these implementations
    - `password_hash()`
    - `password_verify()`
- PHP 7 CSPRNG - Go directly to [https://github.com/paragonie/random\_compat](https://github.com/paragonie/random_compat) for these implementations
    - `random_bytes()`
    - `random_int()`

Why?
----

[](#why)

When our consultants submit security enhancements to open source projects, the maintainers sometimes complain that some features are only in newer versions of PHP so they can't require them. We wrote this to provide compatibility across all versions of PHP and prevent these issues from occurring.

In the future, we will attempt to backport *some* PHP 7 features for use in versions 5.5 and 5.6, where possible.

How it Works
------------

[](#how-it-works)

Features that only exist in future versions are exposed in the global namespace. These functions call the appropriate classes/methods from the `src` folder. This ensures that PHP only load the codes when it actually needs it.

How to use this library
-----------------------

[](#how-to-use-this-library)

### Composer

[](#composer)

```
composer require sarciszewski/php-future
```

### Any script

[](#any-script)

Just include our `autoload.php` script outside of our `src` directory and you're good to go. For example:

```
require_once "vendor/sarciszewski/php-future/autoload.php";
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Unknown

Total

1

Last Release

3243d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c95e466d6d30f6bd43b41fc7c18b7cbdb7f0a0ae063fe80dde350b9079f86f?d=identicon)[UnityMagentoPackagistUser](/maintainers/UnityMagentoPackagistUser)

---

Tags

compatibilitysecurityfuturehash\_equals

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/unity-magento-git-hub-user-php-future/health.svg)

```
[![Health](https://phpackages.com/badges/unity-magento-git-hub-user-php-future/health.svg)](https://phpackages.com/packages/unity-magento-git-hub-user-php-future)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[sarciszewski/php-future

Polyfill new (5.6+) features into old (5.4+) versions of PHP

411.5M7](/packages/sarciszewski-php-future)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[voku/anti-xss

anti xss-library

72317.1M77](/packages/voku-anti-xss)

PHPackages © 2026

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