# symfony/polyfill

PHP polyfills

Repository: https://github.com/symfony/polyfill
Canonical: https://ross.abutalabs.com/products/polyfill
Homepage: https://symfony.com
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, polyfill, component, symfony-component, portability
Last push: 2026-08-24T11:45:05+00:00

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

## Adoption (not part of the score)
Stars 2811, forks 158 (observed 2026-08-28T04:07:23.702578+00:00)

## What it is
A set of PHP polyfill packages that backport functions, classes, and constants from newer PHP versions and provide compatibility layers for common extensions like mbstring, iconv, ctype, and intl. It lets code run consistently across different PHP versions and extension configurations.

## Use cases
- use str_contains and str_starts_with on PHP 7.x
- run code on hosts missing the mbstring or intl extension
- backport PHP 8 functions to PHP 7 projects
- make a library compatible across many PHP versions
- replace apc with apcu transparently
- get utf8_encode on newer PHP versions

## When to choose
- you maintain a library or app that must support multiple PHP versions
- your code depends on extensions that may not be installed on all hosts
- you want to use modern PHP functions while keeping backward compatibility

## When to avoid
- you target a single recent PHP version with all extensions available
- you need full intl functionality beyond the limited 'en' locale fallback
- you want a general-purpose utility library rather than compatibility shims

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools, sdk
- domain: developer-tools, web-development, cross-platform
- platform: php
- tags: polyfill, php-compatibility, backporting, portability, symfony-component, mbstring, intl

## Member repositories
- symfony/polyfill (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:23.702578+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-30T08:13:32.740835+00:00, confidence not recorded.
  - readme: https://github.com/symfony/polyfill (fetched 2026-08-28T04:07:23.702578+00:00, sha 6155a37fba30)
  - homepage: https://symfony.com (fetched 2026-08-29T09:54:08.656809+00:00, sha 68595089eb73)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T09:54:08.666077+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/contributing/community/releases.html (fetched 2026-08-29T09:54:08.668251+00:00, sha e46dc2ffbd61)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T09:54:08.670191+00:00, sha 2fd410222cfe)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T09:54:08.672212+00:00, sha 83b70dd163fb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
