# symfony/polyfill-php70

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

Repository: https://github.com/symfony/polyfill-php70
Canonical: https://ross.abutalabs.com/products/polyfill-php70
Homepage: https://symfony.com/polyfill-php70
License: MIT
License Family: permissive
Topics: php, symfony, component, symfony-component, polyfill
Last push: 2023-08-02T10:26:56+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3968, "days_push": 1127, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3189, forks 7 (observed 2026-08-28T04:07:48.123828+00:00)

## What it is
A Symfony polyfill component that backports PHP 7.0 features such as intdiv, preg_replace_callback_array, random_bytes/random_int, and *Error classes to older PHP 5 versions. It lets developers write portable code that runs on both PHP 5 and PHP 7.

## Use cases
- backport php 7.0 functions to php 5
- write code portable between php5 and php7
- use random_bytes and random_int on old php
- shim *Error throwable classes in php 5
- make a library compatible with older php versions

## When to choose
- your code must run on PHP 5.x but uses PHP 7.0 features
- you maintain a library supporting a wide range of PHP versions

## When to avoid
- you only target PHP 7.0 or newer
- you need polyfills for other PHP versions (use the matching polyfill package)

## Facets
- artifact type: library
- maturity: maintenance
- function: sdk, developer-tools
- domain: developer-tools, programming-languages, cross-platform
- platform: php
- tags: polyfill, php7, compatibility-shim, backport, symfony-component

## Member repositories
- symfony/polyfill-php70 (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:48.123828+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:24:57.759861+00:00, confidence not recorded.
  - readme: https://github.com/symfony/polyfill-php70 (fetched 2026-08-28T04:07:48.123828+00:00, sha 200b5e446650)
  - homepage: https://symfony.com/polyfill-php70 (fetched 2026-08-29T09:39:14.074628+00:00, sha e5ca4aad90aa)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T09:39:14.083766+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T09:39:14.085747+00:00, sha 2fd410222cfe)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T09:39:14.087953+00:00, sha cdec5bd82c72)
- Data as of 2026-08-30T08:39:29.467469+00:00.
