Registry / utility / symfony-polyfill-php80

symfony-polyfill-php80

JSON →
library1.37.0phppackagistunverified

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

composer require symfony/polyfill-php80
INSTALL
IMPORT
SIG · SYMFONY-POLYFILL-P
S
symfony-polyfill-php80
utilityphpv1.37.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.

Php80
use Symfony\Polyfill\Php80\Php80;

Uses the polyfill's str_contains function (available in PHP 8.0+).

use Symfony\Polyfill\Php80\Php80; // The polyfill provides functions like str_contains, str_starts_with, etc. echo Php80::str_contains('hello world', 'world') ? 'yes' : 'no';
Debug
Known issues
gotchaThis polyfill only provides functions, not classes or attributes.
fix
For attributes like #[\Attribute], use symfony/polyfill-php81.
affects: >=1.0.0
Upgrade
Version history
1.37.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

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