Compresses an IPv6 address
Description
RFC 4291 allows you to compress consecutive zero pieces in an address to ‘::’. This method expects a valid IPv6 address and compresses consecutive zero pieces to ‘::’.
Example: FF01:0:0:0:0:0:0:101 -> FF01::101 0:0:0:0:0:0:0:1 -> ::1
See also
Parameters
$ip
stringrequired- An IPv6 address
User Contributed Notes
You must log in before being able to contribute a note or feedback.