Registry / utility / symfony-polyfill-php72

symfony-polyfill-php72

JSON →
library1.31.0phppackagistunverified

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

composer require symfony/polyfill-php72
INSTALL
IMPORT
SIG · SYMFONY-POLYFILL-P
S
symfony-polyfill-php72
utilityphpv1.31.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Php72
use Symfony\Polyfill\Php72\Php72;

Automatically provides PHP 7.2 functions when running on older PHP versions.

use Symfony\Polyfill\Php72\Php72; // The polyfill automatically loads functions like `spl_object_id` $id = spl_object_id(new stdClass());
Debug
Known issues
gotchaThis polyfill only provides functions, not all PHP 7.2 features (e.g., parameter type widening).
fix
Ensure your code only relies on the polyfilled functions; upgrade to PHP 7.2+ for full support.
affects: >=1.0.0
Upgrade
Version history
1.31.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
symfony-polyfill-php72 — pip install symfony-polyfill-php72 · libregistry