Net_IPv6::uncompress()

Net_IPv6::uncompress()

Net_IPv6::uncompress() -- Uncompresses an IPv6 address

Description

Uncompresses an IPv6 address. RFC 2373 allows you to compress zeros in an address to '::'. This function expects an valid IPv6 address and expands the '::' to the required zeros.
FF01::101	->  FF01:0:0:0:0:0:0:101
      ::1       ->  0:0:0:0:0:0:0:1

Parameter

  • string $ip - the IP address to uncompress

Return value

string - the uncompressed IP is an IPv6 address

Note

This function can be called statically.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.