Skip to content

Inconsistent get_network_start / get_network_end Behavior #20

@philipithomas

Description

@philipithomas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions