// This will calculate an optimized data structure for the set
$ipset=newIPSet([
'208.80.154.0/26',
'2620:0:861:1::/64',
'10.64.0.0/22',
]);
// Run fast checks against the same re-usable IPSet object
if($ipset->match($ip)){
// ...
}
</pre>
Runningtests
-------------
composerinstall--prefer-dist
composertest
History
-------
TheIPUtilsclassstartedlifein2006aspartof[MediaWiki1.7][https://www.mediawiki.org/wiki/MediaWiki_1.7] ([r15572][https://www.mediawiki.org/wiki/Special:Code/MediaWiki/15572]). It was
duringthe[MediaWiki1.34][https://www.mediawiki.org/wiki/MediaWiki_1.34] development cycle.
TheIPSetclasswascreatedbyBrandonBlackin2014asfasteralternativeto`IPUtils::isInRange()`(MediaWiki1.24,[change131758](https://gerrit.wikimedia.org/r/131758)). It was moved to a library during the MediaWiki 1.26 development cycle ([change 221179](https://gerrit.wikimedia.org/r/221179), [change 218384](https://gerrit.wikimedia.org/r/218384)).