Private Access Private Access
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Summery Summery
Splits an IPv6 address into the IPv6 and IPv4 representation parts
Syntax Syntax
Description Description
RFC 4291 allows you to represent the last two parts of an IPv6 address using the standard IPv4 representation
Example: 0:0:0:0:0:0:13.1.68.3 0:0:0:0:0:FFFF:129.144.52.38
Parameters Parameters
- $ip
-
(Required) An IPv6 address
Return Return
(array) [0] contains the IPv6 represented part, and [1] the IPv4 represented part
Source Source
File: wp-includes/SimplePie/Net/IPv6.php
{ $pos = strrpos($ip, ':'); $ipv6_part = substr($ip, 0, $pos); $ipv4_part = substr($ip, $pos + 1); return array($ipv6_part, $ipv4_part); } return array($ip, ''); } /** * Checks an IPv6 address * * Checks if the given IP is a valid IPv6 address