Can you provide examples or resources for further understanding IP address formats and conversions in PHP?

When working with IP addresses in PHP, it may be necessary to convert between different formats such as IPv4 and IPv6. One common task is converting an IPv4 address to its IPv6 equivalent. This can be achieved by using the `inet_pton()` function to convert the IPv4 address to binary form, then using `inet_ntop()` to convert it to its IPv6 representation.

// Convert IPv4 address to IPv6
$ipv4 = '192.168.1.1';
$ipv6 = inet_ntop(inet_pton($ipv4));

echo $ipv6; // Outputs '::ffff:192.168.1.1'