This is an old revision of the document!

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


Proposed Voting Choices

Whether to implement the proposal above, or not.

This RFC requires a 2/3 majority. Voting starts on 2017-01-31T12:30Z and ends on 2017-02-14T12:30Z.

Deprecate and remove INTL_IDNA_VARIANT_2003
Real name Yes No
ashnazg (ashnazg)  
bishop (bishop)  
cmb (cmb)  
colinodell (colinodell)  
dams (dams)  
daverandom (daverandom)  
eliw (eliw)  
galvao (galvao)  
joey (joey)  
kguest (kguest)  
lcobucci (lcobucci)  
leigh (leigh)  
mariano (mariano)  
mike (mike)  
nikic (nikic)  
ocramius (ocramius)  
pollita (pollita)  
salathe (salathe)  
sammyk (sammyk)  
sobak (sobak)  
stas (stas)  
svpernova09 (svpernova09)  
trowski (trowski)  
zeev (zeev)  
Count: 24 0

Patches and Tests


After the project is implemented, this section should contain

  1. the version(s) it was merged to
  2. a link to the git commit(s)
  3. a link to the PHP manual entry for the feature
  4. a link to the language specification section (if any)


Rejected Features


rfc/deprecate-and-remove-intl_idna_variant_2003.1485865459.txt.gz · Last modified: 2017/09/22 13:28 (external edit)