|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-11-11 11:17 UTC] nikic@php.net
-Package: intl
+Package: I18N and L10N related
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
Description: ------------ Firstly, not really important, IDNA_NONTRANSITIONAL_TO_ASCII IDNA_NONTRANSITIONAL_TO_UNICODE should be merged into a single constant if possible. The reason ICU have both is that IDNA configuration is shared for both encoding and decoding. PHP has two separate functions, one constant would be enough. The constant DOMAIN_NAME_TOO_LONG doesn't look to be actually used ever. Since the functions just return false (without populating $info, when intl.exceptions is off) or throw a generic exception. I would suggest to always populate $info and include this error when intl.exceptions is off. Same goes with idna_to_*("" /* empty string */, ..., ..., $info), rather than just returning false (and throw an exception if they are enabled), i would expect it to populate $info with the IDNA_ERROR_EMPTY_LABEL set (as happens with raw ICU).