8ctopus/nano-ip

experimental ip address library

Installs: 106

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/8ctopus/nano-ip

0.2.0 2025-11-27 06:53 UTC

This package is auto-updated.

Last update: 2025-11-27 11:10:54 UTC


README

packagist downloads min php version license tests code coverage badge lines of code

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

features

  • CIDR ranges

install

  • composer require 8ctopus/nano-ip

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 online Understand CIDR notation More info IP v6

run tests

composer test

clean code

composer fix(-risky)