<?php
// Testing /src/inc/Network.class.php

require_once('../inc/Network.class.php');

$ip1 = '172.16.0.245';
$ip2 = '172.16.0.246';
$ip3 = '172.16.0.249';
$network1 = new Network($ip1, 30);
$network2 = new Network($ip2, 30);
$network3 = new Network($ip3, 30);
echo	'
	Address: ' . $ip1 . ' / ' . Network::binIP($ip1) . '<br/>
	' . $network1->toString() . '<br/>
	Address: ' . $ip2 . ' / ' . Network::binIP($ip2) . '<br/>
	' . $network2->toString() . '<br/>
	Address: ' . $ip3 . ' / ' . Network::binIP($ip3) . '<br/>
	' . $network3->toString() . '<br/>
	Compare network 1 by network 1: ' . $network1->compare($network1) . '<br/>
	Compare network 1 by network 2: ' . $network1->compare($network2) . '<br/>
	Compare network 1 by network 3: ' . $network1->compare($network3) . '<br/>
	Compare network 2 by network 1: ' . $network2->compare($network1) . '<br/>
	Compare network 2 by network 2: ' . $network2->compare($network2) . '<br/>
	Compare network 2 by network 3: ' . $network2->compare($network3) . '<br/>
	Compare network 3 by network 1: ' . $network3->compare($network1) . '<br/>
	Compare network 3 by network 2: ' . $network3->compare($network2) . '<br/>
	Compare network 3 by network 3: ' . $network3->compare($network3) . '<br/>
	<br/>
	Check if IP 1 is in network 1: ' . $network1->inNetwork($ip1) . '<br/>
	Check if IP 2 is in network 1: ' . $network1->inNetwork($ip2) . '<br/>
	Check if IP 3 is in network 1: ' . $network1->inNetwork($ip3) . '<br/>
	Check if IP 1 is in network 2: ' . $network2->inNetwork($ip1) . '<br/>
	Check if IP 2 is in network 2: ' . $network2->inNetwork($ip2) . '<br/>
	Check if IP 3 is in network 2: ' . $network2->inNetwork($ip3) . '<br/>
	Check if IP 1 is in network 3: ' . $network3->inNetwork($ip1) . '<br/>
	Check if IP 2 is in network 3: ' . $network3->inNetwork($ip2) . '<br/>
	Check if IP 3 is in network 3: ' . $network3->inNetwork($ip3) . '<br/>';
?>