src/SubnetReport.php
public function createArrayReport(SubnetCalculator $sub)
    {
        return [
            'ip_address_with_network_size' => $sub->getIPAddress() . '/' . $sub->getNetworkSize(),
            'ip_address' => [
                'quads'  => $sub->getIPAddress(),
                'hex'    => $sub->getIPAddressHex(),
                'binary' => $sub->getIPAddressBinary()
            ],
            'subnet_mask' => [
                'quads'  => $sub->getSubnetMask(),
                'hex'    => $sub->getSubnetMaskHex(),
                'binary' => $sub->getSubnetMaskBinary()
            ],
            'network_portion' => [
                'quads'  => $sub->getNetworkPortion(),
                'hex'    => $sub->getNetworkPortionHex(),
                'binary' => $sub->getNetworkPortionBinary()
            ],
            'host_portion' => [
                'quads'  => $sub->getHostPortion(),
                'hex'    => $sub->getHostPortionHex(),
                'binary' => $sub->getHostPortionBinary()
            ],
            'network_size'                => $sub->getNetworkSize(),
            'number_of_ip_addresses'      => $sub->getNumberIPAddresses(),
            'number_of_addressable_hosts' => $sub->getNumberAddressableHosts(),
            'ip_address_range'            => $sub->getIPAddressRange(),
            'broadcast_address'           => $sub->getBroadcastAddress(),
            'min_host'                    => $sub->getMinHost(),
            'max_host'                    => $sub->getMaxHost(),
        ];
    }
public function createArrayReport(SubnetCalculator $sub)
    {
        return [
            'ip_address_with_network_size' => $sub->getIPAddress() . '/' . $sub->getNetworkSize(),
            'ip_address' => [
                'quads'  => $sub->getIPAddress(),
                'hex'    => $sub->getIPAddressHex(),
                'binary' => $sub->getIPAddressBinary()
            ],
            'subnet_mask' => [
                'quads'  => $sub->getSubnetMask(),
                'hex'    => $sub->getSubnetMaskHex(),
                'binary' => $sub->getSubnetMaskBinary()
            ],
            'network_portion' => [
                'quads'  => $sub->getNetworkPortion(),
                'hex'    => $sub->getNetworkPortionHex(),
                'binary' => $sub->getNetworkPortionBinary()
            ],
            'host_portion' => [
                'quads'  => $sub->getHostPortion(),
                'hex'    => $sub->getHostPortionHex(),
                'binary' => $sub->getHostPortionBinary()
            ],
            'network_size'                => $sub->getNetworkSize(),
            'number_of_ip_addresses'      => $sub->getNumberIPAddresses(),
            'number_of_addressable_hosts' => $sub->getNumberAddressableHosts(),
            'ip_address_range'            => $sub->getIPAddressRange(),
            'broadcast_address'           => $sub->getBroadcastAddress(),
            'min_host'                    => $sub->getMinHost(),
            'max_host'                    => $sub->getMaxHost(),
        ];
    }
public function createArrayReport ( SubnetCalculator $ sub ) { return [ 'ip_address_with_network_size' => $ sub -> getIPAddress ( ) . '/' . $ sub -> getNetworkSize ( ) , 'ip_address' => [ 'quads' => $ sub -> getIPAddress ( ) , 'hex' => $ sub -> getIPAddressHex ( ) , 'binary' => $ sub -> getIPAddressBinary ( ) ] , 'subnet_mask' => [ 'quads' => $ sub -> getSubnetMask ( ) , 'hex' => $ sub -> getSubnetMaskHex ( ) , 'binary' => $ sub -> getSubnetMaskBinary ( ) ] , 'network_portion' => [ 'quads' => $ sub -> getNetworkPortion ( ) , 'hex' => $ sub -> getNetworkPortionHex ( ) , 'binary' => $ sub -> getNetworkPortionBinary ( ) ] , 'host_portion' => [ 'quads' => $ sub -> getHostPortion ( ) , 'hex' => $ sub -> getHostPortionHex ( ) , 'binary' => $ sub -> getHostPortionBinary ( ) ] , 'network_size' => $ sub -> getNetworkSize ( ) , 'number_of_ip_addresses' => $ sub -> getNumberIPAddresses ( ) , 'number_of_addressable_hosts' => $ sub -> getNumberAddressableHosts ( ) , 'ip_address_range' => $ sub -> getIPAddressRange ( ) , 'broadcast_address' => $ sub -> getBroadcastAddress ( ) , 'min_host' => $ sub -> getMinHost ( ) , 'max_host' => $ sub -> getMaxHost ( ) , ] ; }
Get subnet calculations as an associated array
Contains IP address, subnet mask, network portion and host portion.
Each of the above is provided in dotted quads, hexadecimal, and binary notation.
Also contains number of IP addresses and number of addressable hosts, IP address range, and broadcast address.

@param SubnetCalculator $sub

@return array of subnet calculations
Get subnet calculations as an associated array Contains IP address subnet mask network portion and host portion . Each of the above is provided in dotted quads hexadecimal and binary notation . Also contains number of IP addresses and number of addressable hosts IP address range and broadcast address .