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

symfony/polyfill-intl-idn v1.29.0

Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
Package summary
Share
0
issues
0
licenses
Package created
1 Oct 2018
Version published
29 Jan 2024
Maintainers
1
Total deps
0
Direct deps
0
License
MIT
Generating a report...
Hold on while we generate a fresh audit report for this package.

Frequently Asked Questions

What does symfony/polyfill-intl-idn do?

Symfony Polyfill Intl Idn is a crucial component that provides the functionalities of idn_to_ascii and idn_to_utf8 functions to users running PHP versions without the Intl (Internationalization) extension. These functions are key in the implementation of internationalized domain names, turning them into Punycode representation (ASCII) and back to Unicode (UTF-8).

How do you use symfony/polyfill-intl-idn?

To get started with Symfony Polyfill Intl Idn, you need to first install it via Composer:

composer require symfony/polyfill-intl-idn

Once installed, you can use the idn_to_ascii and idn_to_utf8 functions directly in your PHP code. For instance:

$ascii = idn_to_ascii('bücher.tld');
$utf8 = idn_to_utf8('xn--bcher-kva.tld');

The idn_to_ascii function converts a Unicode string to an ASCII string, and idn_to_utf8 does the inverse operation, effectively decoding ASCII strings back into Unicode.

Where are the symfony/polyfill-intl-idn docs?

The documentation for Symfony Polyfill Intl Idn is integrated within the main Symfony polyfill README, which is accessible on the Symfony Polyfill GitHub page. This document will walk you through a comprehensive overview of the package and how to use it in your PHP applications.