SimplePie_Net_IPv6::compress

SummerySummery

Compresses an IPv6 address

Syntax

SimplePie_Net_IPv6::compress( string $ip )

DescriptionDescription

RFC 4291 allows you to compress concecutive 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

ParametersParameters

$ip

(string) (Required) An IPv6 address

ReturnReturn

(string) The compressed IPv6 address

SourceSource

File: wp-includes/SimplePie/Net/IPv6.php


			

See alsoSee also

Scroll to Top