PHPackages                             symfony/polyfill-php70 - 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. symfony/polyfill-php70

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

symfony/polyfill-php70
======================

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

v1.20.0(5y ago)3.2k200.0M—3.1%720MITPHP &gt;=7.1

Since Nov 4Pushed 2y ago4 watchersCompare

[ Source](https://github.com/symfony/polyfill-php70)[ Packagist](https://packagist.org/packages/symfony/polyfill-php70)[ Docs](https://symfony.com)[ Fund](https://symfony.com/sponsor)[ GitHub Sponsors](https://github.com/fabpot)[ RSS](/packages/symfony-polyfill-php70/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelogDependenciesVersions (29)Used By (20)

Symfony Polyfill / Php70
========================

[](#symfony-polyfill--php70)

This component provides features unavailable in releases prior to PHP 7.0:

- [`intdiv`](https://php.net/intdiv)
- [`preg_replace_callback_array`](https://php.net/preg_replace_callback_array)
- [`error_clear_last`](https://php.net/error_clear_last)
- `random_bytes` and `random_int` (from [paragonie/random\_compat](https://github.com/paragonie/random_compat))
- [`*Error` throwable classes](https://php.net/Error)
- [`PHP_INT_MIN`](https://php.net/reserved.constants#constant.php-int-min)
- `SessionUpdateTimestampHandlerInterface`

More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).

Compatibility notes
===================

[](#compatibility-notes)

To write portable code between PHP5 and PHP7, some care must be taken:

- `\*Error` exceptions must be caught before `\Exception`;
- after calling `error_clear_last()`, the result of `$e = error_get_last()` must be verified using `isset($e['message'][0])` instead of `null !== $e`.

License
=======

[](#license)

This library is released under the [MIT license](LICENSE).

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity76

Solid adoption and visibility

Community37

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 52.9% 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 ~65 days

Recently: every ~25 days

Total

29

Last Release

2033d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.3

v1.20.0PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (27 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (5 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (2 commits)")[![Fleshgrinder](https://avatars.githubusercontent.com/u/1059453?v=4)](https://github.com/Fleshgrinder "Fleshgrinder (1 commits)")[![gharlan](https://avatars.githubusercontent.com/u/330436?v=4)](https://github.com/gharlan "gharlan (1 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![IonBazan](https://avatars.githubusercontent.com/u/1985514?v=4)](https://github.com/IonBazan "IonBazan (1 commits)")[![JakeFr](https://avatars.githubusercontent.com/u/5176129?v=4)](https://github.com/JakeFr "JakeFr (1 commits)")[![jeroenvisser101](https://avatars.githubusercontent.com/u/1941348?v=4)](https://github.com/jeroenvisser101 "jeroenvisser101 (1 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (1 commits)")[![Oliboy50](https://avatars.githubusercontent.com/u/2571084?v=4)](https://github.com/Oliboy50 "Oliboy50 (1 commits)")[![RGustBardon](https://avatars.githubusercontent.com/u/1412877?v=4)](https://github.com/RGustBardon "RGustBardon (1 commits)")[![robfrawley](https://avatars.githubusercontent.com/u/3967713?v=4)](https://github.com/robfrawley "robfrawley (1 commits)")[![samnela](https://avatars.githubusercontent.com/u/1852108?v=4)](https://github.com/samnela "samnela (1 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![azjezz](https://avatars.githubusercontent.com/u/29315886?v=4)](https://github.com/azjezz "azjezz (1 commits)")[![z38](https://avatars.githubusercontent.com/u/3948085?v=4)](https://github.com/z38 "z38 (1 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (1 commits)")

---

Tags

componentphppolyfillsymfonysymfony-componentcompatibilityportablepolyfillshim

### Embed Badge

![Health badge](/badges/symfony-polyfill-php70/health.svg)

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

###  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-intl-idn

Symfony polyfill for intl's idn\_to\_ascii and idn\_to\_utf8 functions

3.4k774.6M90](/packages/symfony-polyfill-intl-idn)[symfony/polyfill-intl-normalizer

Symfony polyfill for intl's Normalizer class and related functions

2.1k830.2M36](/packages/symfony-polyfill-intl-normalizer)[symfony/polyfill-php73

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

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

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

1.7k815.2M457](/packages/symfony-polyfill-php80)

PHPackages © 2026

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