Registry / networking / wikimedia-ip-set

wikimedia-ip-set

JSON →
library4.0.0phppackagistunverified

Efficiently match IP addresses against a set of CIDR specifications.

composer require wikimedia/ip-set
INSTALL
IMPORT
SIG · WIKIMEDIA-IP-SET
W
wikimedia-ip-set
networkingphpv4.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IPSet
use Wikimedia\IPSet\IPSet;

Create an IPSet from CIDR ranges and test an IP.

use Wikimedia\IPSet\IPSet; $ipSet = new IPSet(['1.2.3.0/24', '5.6.7.8']); if ($ipSet->match('1.2.3.4')) { echo 'matched'; }
Debug
Known issues
gotchaIPv6 support requires PHP 5.4+ and GMP or BC Math
fix
Install GMP or BC Math extension for IPv6 matching
affects: >=4.0
Upgrade
Version history
4.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
wikimedia-ip-set — pip install wikimedia-ip-set · libregistry