This is IP collection library. You can fill collection IP's in several formats: from single IP to range of IPs.
Then you can check is any IP is included inside this collection.
use Kester36\IpCollection\IpCollection;
use Kester36\IpCollection\Ip;
use Kester36\IpCollection\IpRange;
use Kester36\IpCollection\IpCidr;
$collection = new IpCollection;
// add single IP
$collection->add(new Ip('10.10.0.1'));
$collection->add(new Ip('10.10.100.212'));
// add IPv4 range
$collection->add(new IpRange('127.0.0.1-127.0.0.100'));
$collection->add(new IpRange('127.0.1.223-127.0.2.31'));
// add CIDR notation (IPv4)
$collection->add(new IpCidr('192.168.0.0/16'));/** @var Kester36\IpCollection\IpCollection $collection */
$collection->includes('192.168.100.200');/** @var Kester36\IpCollection\IpCollection $collection */
$items = $collection->getAll();