The Symfony Polyfill / Intl IDN Component
This component provides a collection of functions related to IDN when theIntl extension is not installed.
Installation
- $ composer require symfony/polyfill-intl-idn
Note
If you install this component outside of a Symfony application, you mustrequire the vendor/autoload.php
file in your code to enable the classautoloading mechanism provided by Composer. Readthis article for more details.
Usage
Once this component is installed in your application, you can use the followingfunctions, no matter if the PHP intl extension is installed or not in yourserver.
Provided Functions
Symfony provides more polyfills for other classes and functions related tothe Intl PHP extension:polyfill-intl-grapheme,polyfill-intl-icu,polyfill-intl-messageformatter,and polyfill-intl-normalizer.