PHPackages                             8ctopus/nano-ip - 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. 8ctopus/nano-ip

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

8ctopus/nano-ip
===============

experimental ip address library

0.2.0(7mo ago)0115MITPHPPHP &gt;=8.1CI passing

Since Jun 27Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/8ctopus/nano-ip)[ Packagist](https://packagist.org/packages/8ctopus/nano-ip)[ Docs](https://github.com/8ctopus/nano-ip)[ RSS](/packages/8ctopus-nano-ip/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (5)Used By (0)

nano ip
=======

[](#nano-ip)

[![packagist](https://camo.githubusercontent.com/890bed50f12f6c1c3b7bcfdbc04f681227639ff1e838485ed8654a8c421e0f66/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f6e616e6f2d69702f76)](https://packagist.org/packages/8ctopus/nano-ip)[![downloads](https://camo.githubusercontent.com/aba8df6f32ea43f70f6c75f3328b8a06628a540517b394201f0225c1e4cb7cbb/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f6e616e6f2d69702f646f776e6c6f616473)](https://packagist.org/packages/8ctopus/nano-ip)[![min php version](https://camo.githubusercontent.com/342d76f96ca54da38be775518606159a6ca430aaebfe0ecd7b2616959dd7ad75/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f6e616e6f2d69702f726571756972652f706870)](https://packagist.org/packages/8ctopus/nano-ip)[![license](https://camo.githubusercontent.com/8576bda4f029d18a44572197ded11541e2c706dacc9d5414abcdc5d9d8d35959/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f6e616e6f2d69702f6c6963656e7365)](https://packagist.org/packages/8ctopus/nano-ip)[![tests](https://github.com/8ctopus/nano-ip/actions/workflows/tests.yml/badge.svg)](https://github.com/8ctopus/nano-ip/actions/workflows/tests.yml)[![code coverage badge](https://raw.githubusercontent.com/8ctopus/nano-ip/image-data/coverage.svg)](https://raw.githubusercontent.com/8ctopus/nano-ip/image-data/coverage.svg)[![lines of code](https://raw.githubusercontent.com/8ctopus/nano-ip/image-data/lines.svg)](https://raw.githubusercontent.com/8ctopus/nano-ip/image-data/lines.svg)

Experimental package to check if an IPv4 ip address is in a list of ranges.

features
--------

[](#features)

- CIDR ranges

install
-------

[](#install)

- `composer require 8ctopus/nano-ip`

example
-------

[](#example)

```
use Oct8pus\NanoIP\CIDR;

require_once __DIR__ . '/vendor/autoload.php';

$range = '192.168.100.0/22';

$range = new CIDRRange($range);

echo $range;
```

```
192.168.100.0/22 range contains 1024 addresses 192.168.100.0 - 192.168.103.255
```

Test [CIDR ranges](https://ipinfo.io/tools/cidr-to-ip-range-converter) online [Understand CIDR notation](https://michelburnett27.medium.com/understanding-cidr-notation-and-ip-address-range-3ad28194bc8d)[More info](https://www.digitalocean.com/community/tutorials/understanding-ip-addresses-subnets-and-cidr-notation-for-networking)[IP v6](https://www.cidr.eu/en/ipv6)

run tests
---------

[](#run-tests)

```
composer test

```

clean code
----------

[](#clean-code)

```
composer fix(-risky)

```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance64

Regular maintenance activity

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~294 days

Total

4

Last Release

219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4dafd5f7ef8134a5c9b231686c5da3d6416db09139b45aac0b26952178dffb8a?d=identicon)[8ctopus](/maintainers/8ctopus)

---

Top Contributors

[![8ctopus](https://avatars.githubusercontent.com/u/13252042?v=4)](https://github.com/8ctopus "8ctopus (33 commits)")

---

Tags

ipv4cidrrange check

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/8ctopus-nano-ip/health.svg)

```
[![Health](https://phpackages.com/badges/8ctopus-nano-ip/health.svg)](https://phpackages.com/packages/8ctopus-nano-ip)
```

###  Alternatives

[s1lentium/iptools

PHP Library for manipulating network addresses (IPv4 and IPv6)

2446.6M28](/packages/s1lentium-iptools)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

175852.6k14](/packages/markrogoyski-ipv4-subnet-calculator)[zoujingli/ip2region

ip2region v3.0 for PHP - 企业级 IP 地理位置查询库，支持 IPv4 和 IPv6，多种缓存策略，零依赖，开箱即用

1.4k475.0k67](/packages/zoujingli-ip2region)[mlocati/ip-lib

Handle IPv4, IPv6 addresses and ranges

3167.3M68](/packages/mlocati-ip-lib)[jalle19/php-whitelist-check

Provides a simple way to check whether an address or domain is on a whitelist

45796.8k4](/packages/jalle19-php-whitelist-check)[rlanvin/php-ip

IPv4/IPv6 manipulation library for PHP

180803.8k12](/packages/rlanvin-php-ip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
