1667383140
This project backports features found in the latest PHP versions and provides compatibility layers for some extensions and functions. It is intended to be used when portability across PHP versions and extensions is desired.
Polyfills are provided for:
apcu
extension when the legacy apc
extension is installed;ctype
extension when PHP is compiled without ctype;mbstring
and iconv
extensions;uuid
extension;MessageFormatter
class and the msgfmt_format_message
functions;Normalizer
class and the grapheme_*
functions;utf8_encode
and utf8_decode
functions from the xml
extension or PHP-7.2 core;Collator
, NumberFormatter
, Locale
and IntlDateFormatter
classes, limited to the "en" locale;intl_error_name
, intl_get_error_code
, intl_get_error_message
and intl_is_failure
functions;idn_to_ascii
and idn_to_utf8
functions;hex2bin
function, the CallbackFilterIterator
, RecursiveCallbackFilterIterator
and SessionHandlerInterface
classes introduced in PHP 5.4;array_column
, boolval
, json_last_error_msg
and hash_pbkdf2
functions introduced in PHP 5.5;password_hash
and password_*
related functions introduced in PHP 5.5, provided by the ircmaxell/password-compat
package;hash_equals
and ldap_escape
functions introduced in PHP 5.6;*Error
classes, the error_clear_last
, preg_replace_callback_array
and intdiv
functions introduced in PHP 7.0;random_bytes
and random_int
functions introduced in PHP 7.0, provided by the paragonie/random_compat
package;PHP_INT_MIN
constant introduced in PHP 7.0,SessionUpdateTimestampHandlerInterface
interface introduced in PHP 7.0,is_iterable
function introduced in PHP 7.1;Binary
utility class to be used when compatibility with mbstring.func_overload
is required;spl_object_id
and stream_isatty
functions introduced in PHP 7.2;mb_ord
, mb_chr
and mb_scrub
functions introduced in PHP 7.2 from the mbstring
extensionsapi_windows_vt100_support
function (Windows only) introduced in PHP 7.2;PHP_FLOAT_*
constant introduced in PHP 7.2;PHP_OS_FAMILY
constant introduced in PHP 7.2;is_countable
function introduced in PHP 7.3;array_key_first
and array_key_last
functions introduced in PHP 7.3;hrtime
function introduced in PHP 7.3;JsonException
class introduced in PHP 7.3;get_mangled_object_vars
, mb_str_split
and password_algos
functions introduced in PHP 7.4;fdiv
function introduced in PHP 8.0;get_debug_type
function introduced in PHP 8.0;preg_last_error_msg
function introduced in PHP 8.0;str_contains
function introduced in PHP 8.0;str_starts_with
and str_ends_with
functions introduced in PHP 8.0;ValueError
class introduced in PHP 8.0;UnhandledMatchError
class introduced in PHP 8.0;FILTER_VALIDATE_BOOL
constant introduced in PHP 8.0;get_resource_id
function introduced in PHP 8.0;Attribute
class introduced in PHP 8.0;Stringable
interface introduced in PHP 8.0;PhpToken
class introduced in PHP 8.0 when the tokenizer extension is enabled;array_is_list
function introduced in PHP 8.1;enum_exists
function introduced in PHP 8.1;MYSQLI_REFRESH_REPLICA
constant introduced in PHP 8.1;ReturnTypeWillChange
attribute introduced in PHP 8.1;AllowDynamicProperties
attribute introduced in PHP 8.2;SensitiveParameter
attribute introduced in PHP 8.2;SensitiveParameterValue
class introduced in PHP 8.2;It is strongly recommended to upgrade your PHP version and/or install the missing extensions whenever possible. This polyfill should be used only when there is no better choice or when portability is a requirement.
Compatibility notes
To write portable code between PHP5 and PHP7, some care must be taken:
\*Error
exceptions must be caught before \Exception
;error_clear_last()
, the result of $e = error_get_last()
must be verified using isset($e['message'][0])
instead of null !== $e
.Usage
When using Composer to manage your dependencies, you should not require
the symfony/polyfill
package, but the standalone ones:
symfony/polyfill-apcu
for using the apcu_*
functions,symfony/polyfill-ctype
for using the ctype functions,symfony/polyfill-php54
for using the PHP 5.4 functions,symfony/polyfill-php55
for using the PHP 5.5 functions,symfony/polyfill-php56
for using the PHP 5.6 functions,symfony/polyfill-php70
for using the PHP 7.0 functions,symfony/polyfill-php71
for using the PHP 7.1 functions,symfony/polyfill-php72
for using the PHP 7.2 functions,symfony/polyfill-php73
for using the PHP 7.3 functions,symfony/polyfill-php74
for using the PHP 7.4 functions,symfony/polyfill-php80
for using the PHP 8.0 functions,symfony/polyfill-php81
for using the PHP 8.1 functions,symfony/polyfill-php82
for using the PHP 8.2 functions,symfony/polyfill-iconv
for using the iconv functions,symfony/polyfill-intl-grapheme
for using the grapheme_*
functions,symfony/polyfill-intl-idn
for using the idn_to_ascii
and idn_to_utf8
functions,symfony/polyfill-intl-icu
for using the intl functions and classes,symfony/polyfill-intl-messageformatter
for using the intl messageformatter,symfony/polyfill-intl-normalizer
for using the intl normalizer,symfony/polyfill-mbstring
for using the mbstring functions,symfony/polyfill-util
for using the polyfill utility helpers.symfony/polyfill-uuid
for using the uuid_*
functions,Requiring symfony/polyfill
directly would prevent Composer from sharing correctly polyfills in dependency graphs. As such, it would likely install more code than required.
Design
This package is designed for low overhead and high quality polyfilling.
It adds only a few lightweight require
statements to the bootstrap process to support all polyfills. Implementations are then loaded on-demand when needed during code execution.
If your project requires a minimum PHP version it is advisable to add polyfills for lower PHP versions to the replace
section of your composer.json
. This removes any overhead from these polyfills as they are no longer part of your project. The same can be done for polyfills for extensions that you require.
If your project requires php 7.0, and needs the mb extension, the replace section would look something like this:
{
"replace": {
"symfony/polyfill-php54": "*",
"symfony/polyfill-php55": "*",
"symfony/polyfill-php56": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-mbstring": "*"
}
}
Polyfills are unit-tested alongside their native implementation so that feature and behavior parity can be proven and enforced in the long run.
Author: Symfony
Source Code: https://github.com/symfony/polyfill
License: MIT license
1597820991
Looking to develop a PHP based website from scratch or revamp your existing website?
HourlyDeveloper.io has always been an industry leader for companies and business owners looking to hire PHP web developer. By choosing to Hire PHP Developer from our company, you can always expect the best results. Our PHP services and solutions are always flexible which means that no matter the nature of your project, you can always count on us for getting the best PHP expertise.
Consult with our experts: https://bit.ly/3aEGxPy
#hire php developer #php developer #php development company #php development services #php development #php
1617276472
A framework that can drastically cut down the requirement to write original code to develop the web apps as per your requirement is PHP Framework. PHP frameworks offer code libraries for commonly used functions to reduce the development time.
Want to use PHP Web Frameworks for your web applications?
WebClues Infotech offers a service to hire dedicated PHP developers for all of the below-mentioned frameworks
Not sure which framework to use for your PHP web application?
Schedule Interview with PHP Developer https://bit.ly/3dsTWf0
Email: sales@webcluesinfotech.com
#hire php developer #hire php web developers #hire php developer in 2021 #hire php developers & dedicated php programmers #hire php developers india #hire and outsource freelance php developers
1613990718
ValueCoders is a leading PHP app development company that focuses on building robust, secure & scalable web applications for start-ups, enterprises, and entrepreneurs.
We have 16+ years of experience and have delivered custom PHP web development solutions to 2500+ global clients catering industry verticals, including healthcare, adtech, eLearning, data analysis, Fintech, eCommerce, etc
#hire php developer #hire a php developer in india #hire dedicated php programmers #hire php coders #php developer in india #php developers for hire
1593154878
Looking to hire affordable yet experienced PHP developers?
Hire Dedicated PHP Developer, who can convert your idea to reality, within the stipulated time frame. HourlyDeveloper.io expertise & experience as the top PHP development company put us above our competitors, in many ways. We have some of the top PHP developers in the industry, which can create anything you can imagine, that too, at the most competitive prices.
Consult with our experts:- https://bit.ly/2NpKnB8
#hire dedicated php developer #php developers #php development company #php development services #php development #php developer
1622201416
One programming language that has its root in Website development even at present is PHP Website Development. The PHP programming is executed on the server side which means it functions on web servers which helps the website in its performance.
Want to develop a website on PHP?
WebClues Infotech with its years of experience in Web Development helps individuals and businesses in launching a business website on PHP. The experienced development team with more than 20 years of experience is the solution to your every web development needs.
Want to know more about PHP website development?
Visit: https://www.webcluesinfotech.com/php-web-development/
Share your requirements https://www.webcluesinfotech.com/contact-us/
View Portfolio https://www.webcluesinfotech.com/portfolio/
#custom php development company #php web development service #php development services #php web development company india #php development services #hire php developers