Christoph Michael Becker


PHP RFC: Deprecate and remove INTL_IDNA_VARIANT_2003


As of ICU 55.1 (released 2015-04-01) the IDNA2003 APIs are deprecated, because UTS #46 should be preferred over the obsolete IDNA 2003 variant. However, the intl extension still uses INTL_IDNA_VARIANT_2003 as default for idn_to_ascii() and idn_to_utf8(), which should be changed as soon as possible.


Therefore I suggest the following procedure:

  • PHP 7.2: deprecate INTL_IDNA_VARIANT_2003
  • PHP 7.4: change the default of idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to INTL_IDNA_VARIANT_UTS46
  • PHP 8.0: remove support for INTL_IDNA_VARIANT_2003 altogether

Backward Incompatible Changes

Obviously, code explicitly using INTL_IDNA_VARIANT_2003 would break (during PHP 7 only with regard to triggering a deprecation notice), and code relying on the default variant might break (however, it might be “magically” fixed as well).

RFC Impact

Besides the obvious behavioral changes to idn_to_ascii() an idn_to_utf8() there is no further impact on SAPIs, extensions or OPcache.

Open Issues


Patches and Tests


  1. PR #2355 has been merged into master (which is supposed to become PHP-7.2) with commit 6cfbb7f9.
  2. The PHP manual has been updated. The migration guide will be written based on UPGRADING, which already has a respective note.


Rejected Features



An option needs 2/3 votes to win

Deprecate and remove INTL_IDNA_VARIANT_2003 (100% approved)
User Vote
ashnazg Yes
bishop Yes
cmb Yes
colinodell Yes
dams Yes
daverandom Yes
eliw Yes
galvao Yes
joey Yes
kguest Yes
lcobucci Yes
leigh Yes
mariano Yes
mike Yes
nikic Yes
ocramius Yes
pollita Yes
salathe Yes
sammyk Yes
sobak Yes
stas Yes
svpernova09 Yes
trowski Yes
zeev Yes