private function validate($encoded): bool
    {
        // Check for existence of the prefix
        if (strpos($encoded, self::punycodePrefix) !== 0) {
            return false;
        }

        // If nothing is left after the prefix, it is hopeless
        if (strlen(trim($encoded)) <= strlen(self::punycodePrefix)) {
            return false;
        }

        return true;
    }
private function validate($encoded): bool
    {
        // Check for existence of the prefix
        if (strpos($encoded, self::punycodePrefix) !== 0) {
            return false;
        }

        // If nothing is left after the prefix, it is hopeless
        if (strlen(trim($encoded)) <= strlen(self::punycodePrefix)) {
            return false;
        }

        return true;
    }
private function validate ( $ encoded ) : bool { // Check for existence of the prefix if ( strpos ( $ encoded , self :: punycodePrefix ) !== 0 ) { return false ; } // If nothing is left after the prefix, it is hopeless if ( strlen ( trim ( $ encoded ) ) <= strlen ( self :: punycodePrefix ) ) { return false ; } return true ; }
Checks, whether or not the provided string is a valid punycode string
@param string $encoded
@return boolean
Checks whether or not the provided string is a valid punycode string