cyberline/ip-net-calc

Compute the common mask from multiple IP addresses

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/cyberline/ip-net-calc

v1.0 2014-11-14 10:32 UTC

This package is auto-updated.

Last update: 2025-09-29 01:17:56 UTC


README

Scrutinizer Code Quality Build Status SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License

Compute the common mask from multiple IP addresses

Example

<?php
require_once 'IpNetCalc.php';

// returns: 192.168.0.0/22
$ip = new IpNetCalc\IpNetCalc();
print $ip->calcNetSum(array('192.168.0.1', '192.168.2.40'));

// returns: 2000::/4
print $ip->calcNetSum(array('2a00:1450:8004::69', '2001:1af8:1:f006::6'));