PHPackages                             leth/ip-address - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. leth/ip-address

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

leth/ip-address
===============

IPv4 and IPv6 address and subnet classes with awesome utility functions.

v2.0.1(2y ago)62716.6k—1.1%14[1 issues](https://github.com/leth/PHP-IPAddress/issues)3LGPL-3.0-or-laterPHPPHP &gt;=8.1

Since Apr 3Pushed 2y ago5 watchersCompare

[ Source](https://github.com/leth/PHP-IPAddress)[ Packagist](https://packagist.org/packages/leth/ip-address)[ RSS](/packages/leth-ip-address/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (9)Used By (3)

PHP-IPAddress
=============

[](#php-ipaddress)

A set of utility classes for working with IP addresses in PHP. Supports both IPv4 and IPv6 schemes.

### Requirements

[](#requirements)

- PHP version 5.3.0 or greater.
- The [PEAR](http://pear.php.net/) [Math\_BigInteger](http://pear.php.net/package/Math_BigInteger/) class

    Required for add &amp; subtract operations on IPv6 addresses, and finding IPs in IPv6 address blocks.

Examples
--------

[](#examples)

```
