Inconsistent get_network_start / get_network_end Behavior
philipithomas opened this issue · comments
Philip I. Thomas commented
Compare these:
$foo = IP\NetworkAddress::factory("127.0.0.1");
$foo->get_cidr(); // 32
$foo->get_network_start(); // Null
$foo->get_network_end(); // Null
$bar = IP\NetworkAddress::factory("127.0.0.1/32");
$bar->get_cidr(); // 32
$bar->get_network_start(); // Not Null
$bar->get_network_start(); // Not Null
For consistent behavior - I think that the network start/end on a single IP should work the same as if it were loaded with a single address CIDR (i.e. 32 for IPv4).
I can work on the code for this, but I'm opening an issue for tracking.
Marcus Cobden commented
Definitely looks like a bug! Thanks
Marcus Cobden commented
Closing as per discussion in #21