public static function reverseIpv4(string $ip): string
    {
        $octets = array_reverse(explode('.', $ip));

        return implode('.', $octets).'.in-addr.arpa.';
    }
public static function reverseIpv4(string $ip): string
    {
        $octets = array_reverse(explode('.', $ip));

        return implode('.', $octets).'.in-addr.arpa.';
    }
public static function reverseIpv4 ( string $ ip ) : string { $ octets = array_reverse ( explode ( '.' , $ ip ) ) ; return implode ( '.' , $ octets ) . '.in-addr.arpa.' ; }
Creates a reverse IPv4 address.

E.g. 192.168.1.213 -> 213.1.168.192.in-addr.arpa.

@param string $ip Valid IPv4 address

@return string Reversed IP address appended with ".in-addr.arpa."
Creates a reverse IPv4 address .