|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-09-04 16:48 UTC] jocrutrisi at ibsats dot com
Description:
------------
Apparently the 2003 variant of encoding was deprecated in 7.2, but no matter what variant I pass, I get the same deprecation error "Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated"
This looks like a bug.
Test script:
---------------
echo(idn_to_ascii("здравей"));
echo(idn_to_ascii("здравей", INTL_IDNA_VARIANT_2003));
echo(idn_to_ascii("здравей", INTL_IDNA_VARIANT_UTS46));
echo(idn_to_ascii("здравей", IDNA_NONTRANSITIONAL_TO_ASCII));
Expected result:
----------------
At least one of those shouldn't issue a warning...
Actual result:
--------------
Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /in/MPSvP on line 2
xn--80aeeggq9b
Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /in/MPSvP on line 3
xn--80aeeggq9b
Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /in/MPSvP on line 4
xn--80aeeggq9b
Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /in/MPSvP on line 5
xn--80aeeggq9b
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 04:00:01 2025 UTC |
echo(idn_to_ascii("здравей")); echo(idn_to_ascii("здравей", 0, INTL_IDNA_VARIANT_2003)); echo(idn_to_ascii("здравей", 0, INTL_IDNA_VARIANT_UTS46)); echo(idn_to_ascii("здравей", 0, IDNA_NONTRANSITIONAL_TO_ASCII)); Again, you're supposed to pass $variant as the THIRD parameter, not second ($options).