Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via composer

symfony/polyfill-php54 v1.20.0

Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions
Package summary
Share
0
issues
1
license
1
MIT
Package created
25 Oct 2015
Version published
23 Oct 2020
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-php54@v1.20.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-php54 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does symfony/polyfill-php54 do?

The symfony/polyfill-php54 is designed to provide backwards compatibility to scripts written in PHP 5.4 or above, allowing them to run on lower versions of PHP. It does this by implementing functions that do not exist in releases prior to PHP 5.4, like trait_exists, class_uses, hex2bin, and session_register_shutdown.

How do you use symfony/polyfill-php54?

You can use symfony/polyfill-php54 by including it in your PHP project. Firstly, you will need to add it to your project using composer. You can do that by running the following command in the console:

composer require symfony/polyfill-php54

Now you can use the functions trait_exists, class_uses, hex2bin, and session_register_shutdown in your code, and your project will be compatible with PHP versions lower than 5.4. Here are examples of how you can use each function:

// Check if a trait exists
if(!trait_exists('MyTrait')) {
    echo 'Trait does not exist';
}

// Return all traits used by a class
$traits = class_uses('MyClass');

// Decode a hexadecimally encoded binary string
$binary = hex2bin('6578616d706c65206865782064617461');

// Register 'shutdown' to be called when the script ends
session_register_shutdown('shutdown');

Where are the symfony/polyfill-php54 docs?

The documentation for symfony/polyfill-php54 is located in the main README of the symfony/polyfill GitHub project, which you can access here. The documentation provides further information about the functionality of the package, as well as details about the license under which it is released.