PHP long2ip() Function

PHP Network Reference : Convert a long integer address into a string in IPv4 format

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