public static function a(string $rdata): string
    {
        if (!filter_var($rdata, FILTER_VALIDATE_IP)) {
            throw new \InvalidArgumentException(sprintf('The IP address "%s" is invalid.', $rdata));
        }

        return inet_pton($rdata);
    }
public static function a(string $rdata): string
    {
        if (!filter_var($rdata, FILTER_VALIDATE_IP)) {
            throw new \InvalidArgumentException(sprintf('The IP address "%s" is invalid.', $rdata));
        }

        return inet_pton($rdata);
    }
public static function a ( string $ rdata ) : string { if ( ! filter_var ( $ rdata , FILTER_VALIDATE_IP ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The IP address "%s" is invalid.' , $ rdata ) ) ; } return inet_pton ( $ rdata ) ; }
Used for A and AAAA records.

@param string $rdata

@return string
Used for A and AAAA records .