Bug #80855 [NEW]: FILTER_VALIDATE_DOMAIN does not recognize emoji TLDs with FILTER_FLAG_HOSTNAME

From: Date: Thu, 11 Mar 2021 19:54:24 +0000
Subject: Bug #80855 [NEW]: FILTER_VALIDATE_DOMAIN does not recognize emoji TLDs with FILTER_FLAG_HOSTNAME
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232657@lists.php.net to get a copy of this message
From: vijaycs85 at gmail dot com Operating system: OSX PHP version: 7.4.16 Package: Filter related Bug Type: Bug Bug description:FILTER_VALIDATE_DOMAIN does not recognize emoji TLDs with FILTER_FLAG_HOSTNAME Description: ------------ There are some countries that allow Top Level Domains(TLDs) with emoji and the filter_var does not recognize them. Reference: https://tinyprojects.dev/projects/mailoji Test script: --------------- $domain_name = '⚡.kz'; $is_valid = filter_var($domain_name, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME); var_dump($is_valid); Expected result: ---------------- string(4) "⚡.kz" Actual result: -------------- bool(false) -- Edit bug report at https://bugs.php.net/bug.php?id=80855&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80855&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80855&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80855&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80855&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80855&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80855&r=support Expected behavior: https://bugs.php.net/fix.php?id=80855&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80855&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80855&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80855&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80855&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80855&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80855&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80855&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80855&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80855&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80855&r=mysqlcfg

« previous php.bugs (#232657) next »