public static function isDomainname($value)
    {
        if (strlen($value) > 253) {
            return false;
        }

        $pattern = "/^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/";

        return (boolean) preg_match($pattern, $value);
    }
public static function isDomainname($value)
    {
        if (strlen($value) > 253) {
            return false;
        }

        $pattern = "/^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/";

        return (boolean) preg_match($pattern, $value);
    }
public static function isDomainname ( $ value ) { if ( strlen ( $ value ) > 253 ) { return false ; } $ pattern = "/^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/" ; return ( boolean ) preg_match ( $ pattern , $ value ) ; }
Checks if value is domainname

@param  mixed  $value
@return boolean
Checks if value is domainname