# symfony/polyfill-php72

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

Repository: https://github.com/symfony/polyfill-php72
Canonical: https://ross.abutalabs.com/products/polyfill-php72
Homepage: https://symfony.com/polyfill-php72
License: MIT
License Family: permissive
Topics: compatibility, component, javascript, polyfill, portable, shim, symfony, symfony-component, symfony-polyfill
Last push: 2024-09-09T12:24:34+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": 3372, "days_push": 723, "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 4728, forks 6 (observed 2026-08-28T04:08:57.623631+00:00)

## What it is
A Symfony component that backports PHP 7.2 core and mbstring functions (such as spl_object_id, stream_isatty, mb_ord, mb_chr, and utf8_encode/decode) to older PHP versions. It is installed via Composer and lets code written against PHP 7.2 APIs run on earlier PHP runtimes.

## Use cases
- run code using PHP 7.2 functions on PHP 7.1 or older
- use mb_ord and mb_chr without PHP 7.2 mbstring
- get PHP_FLOAT_* constants and PHP_OS_FAMILY on older PHP
- make a library compatible across PHP versions
- backport utf8_encode and utf8_decode to older runtimes

## When to choose
- you maintain a library that must support PHP versions below 7.2
- you need specific PHP 7.2 functions or constants on older runtimes
- you want a tiny, MIT-licensed, Composer-installable compatibility shim

## When to avoid
- your code targets PHP 7.2 or newer only
- you need polyfills for other PHP versions (use the matching symfony/polyfill package)
- you are not using Composer or PHP

## Facets
- artifact type: library
- maturity: maintenance
- function: sdk, developer-tools
- domain: programming-languages, developer-tools, web-development, cross-platform
- platform: php, cross-platform, windows
- tags: polyfill, shim, php-72, compatibility, symfony-component, mbstring, composer

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

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:57.623631+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-29T18:19:03.393882+00:00, confidence not recorded.
  - readme: https://github.com/symfony/polyfill-php72 (fetched 2026-08-28T04:08:57.623631+00:00, sha 3968fe22eb94)
  - homepage: https://symfony.com/polyfill-php72 (fetched 2026-08-29T09:03:03.214810+00:00, sha 95cacd2df7ab)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T09:03:03.217262+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T09:03:03.219133+00:00, sha f109a7a4a5da)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T09:03:03.220991+00:00, sha 35b9da44a68e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
