PHP long2ip() Function
Example
Convert a long integer address into a string in IPv4 format:
<?php
echo(long2ip(344294967296));
?>
Try it Yourself »
Definition and Usage
The long2ip() function converts a long integer address into a string in IPv4 format.
Syntax
long2ip(address)
Parameter Values
Parameter | Description |
---|---|
address | Required. Specifies a long integer that represents an IP address |
Technical Details
Return Value: | The IP address as a string |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.1: Changed the address parameter from string to integer. |
❮ PHP Network Reference