Net_IPv4::ip2double() – Converts an IP address to a PHP double.


require_once 'Net/IPv4.php';

float ip2double ( string $ip_addr )


Converts an IP address to a PHP double - for example "" to "3232235776". A double is, in contrast to ip2long's integer, not signed and may be more comfortable when presented to the user. It can still be reconverted with PHP's long2ip().


This function can be called statically.

Converts a hexadecimal string into a dot-quad formatted IP address (Previous) Validate the syntax of the given IP adress. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.