src/RegisteredDomain.php
protected function convertPunycode($part)
    {
        if (strpos($part, 'xn--')===0) {
            if (function_exists('idn_to_utf8')) {
                if (defined('INTL_IDNA_VARIANT_UTS46')) { // PHP 7.2
                    return idn_to_utf8($part, 0, INTL_IDNA_VARIANT_UTS46);
                }
                return idn_to_utf8($part);
            }
            return $this->decodePunycode($part);
        }
        return $part;
    }
protected function convertPunycode($part)
    {
        if (strpos($part, 'xn--')===0) {
            if (function_exists('idn_to_utf8')) {
                if (defined('INTL_IDNA_VARIANT_UTS46')) { // PHP 7.2
                    return idn_to_utf8($part, 0, INTL_IDNA_VARIANT_UTS46);
                }
                return idn_to_utf8($part);
            }
            return $this->decodePunycode($part);
        }
        return $part;
    }
protected function convertPunycode ( $ part ) { if ( strpos ( $ part , 'xn--' ) === 0 ) { if ( function_exists ( 'idn_to_utf8' ) ) { if ( defined ( 'INTL_IDNA_VARIANT_UTS46' ) ) { // PHP 7.2 return idn_to_utf8 ( $ part , 0 , INTL_IDNA_VARIANT_UTS46 ) ; } return idn_to_utf8 ( $ part ) ; } return $ this -> decodePunycode ( $ part ) ; } return $ part ; }
Convert a punycode string to UTF-8 if needed

@param string $part host component

@return string host component as UTF-8
Convert a punycode string to UTF - 8 if needed