Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via composer

symfony/polyfill-php81 v1.29.0

Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions
Package summary
Share
0
issues
1
license
1
MIT
Package created
7 Jan 2021
Version published
29 Jan 2024
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
symfony/polyfill-php81@v1.29.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of symfony/polyfill-php81 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does symfony/polyfill-php81 do?

Symfony/polyfill-php81 is a component that backports certain PHP 8.1 features to older versions of PHP. This package provides a more inclusive development environment by allowing developers to take advantage of features that are typically exclusive to PHP 8.1, including array_is_list, enum_exists, MYSQLI_REFRESH_REPLICA constant, ReturnTypeWillChange, and CURLStringFile functionalities (though the latter is only usable if PHP >= 7.4).

How do you use symfony/polyfill-php81?

To effectively use Symfony/polyfill-php81 in your PHP projects, you need to install it via Composer first. Here is an example command to add the package to your project:

composer require symfony/polyfill-php81

Once Symfony/polyfill-php81 is part of your dependencies, PHP 8.1 features will automatically be available for use. You don't need to refer to the polyfill directly in your code – just write your code as if you're running PHP 8.1.

Here's an example where we're using the array_is_list feature in an older PHP version:

require_once __DIR__ . '/vendor/autoload.php';

$list = [1, 2, 3, 4];
$notList = [1 => 'a', 2 => 'b', 'c' => 3];

var_dump(array_is_list($list));    // Outputs: bool(true)
var_dump(array_is_list($notList)); // Outputs: bool(false)

Where are the symfony/polyfill-php81 docs?

The documentation for Symfony/polyfill-php81 can be found at the main Polyfill README page which is situated on GitHub. You can access more in-depth information about its purpose, usage, and available features here.