private function getAddressRange($netblock)
    {
        $t = explode('/', $netblock);
        $addr = $t[0];
        $cidr = $t[1];

        $corr=( pow(2, 32) - 1)-(pow(2, 32 - $cidr) - 1 );
        $first=ip2long($addr) & ($corr);
        $length=pow(2, 32 - $cidr) - 1;

        return [
            'begin'  => $first,
            'end'   => $first + $length,
        ];

    }
private function getAddressRange($netblock)
    {
        $t = explode('/', $netblock);
        $addr = $t[0];
        $cidr = $t[1];

        $corr=( pow(2, 32) - 1)-(pow(2, 32 - $cidr) - 1 );
        $first=ip2long($addr) & ($corr);
        $length=pow(2, 32 - $cidr) - 1;

        return [
            'begin'  => $first,
            'end'   => $first + $length,
        ];

    }
private function getAddressRange ( $ netblock ) { $ t = explode ( '/' , $ netblock ) ; $ addr = $ t [ 0 ] ; $ cidr = $ t [ 1 ] ; $ corr = ( pow ( 2 , 32 ) - 1 ) - ( pow ( 2 , 32 - $ cidr ) - 1 ) ; $ first = ip2long ( $ addr ) & ( $ corr ) ; $ length = pow ( 2 , 32 - $ cidr ) - 1 ; return [ 'begin' => $ first , 'end' => $ first + $ length , ] ; }
Build array with first and last address of a netblock based on CIDR

@param string $netblock
@return array netblockinfo
Build array with first and last address of a netblock based on CIDR