src/SubnetCalculator.php
public function getAllHostIPAddresses()
    {
        list($start_ip, $end_ip) = $this->getIPAddressRangeAsInts();

        if ($this->getNetworkSize() < 31) {
            $start_ip += 1;
            $end_ip   -= 1;
        }

        for ($ip = $start_ip; $ip <= $end_ip; $ip++) {
            yield long2ip($ip);
        }
    }
public function getAllHostIPAddresses()
    {
        list($start_ip, $end_ip) = $this->getIPAddressRangeAsInts();

        if ($this->getNetworkSize() < 31) {
            $start_ip += 1;
            $end_ip   -= 1;
        }

        for ($ip = $start_ip; $ip <= $end_ip; $ip++) {
            yield long2ip($ip);
        }
    }
public function getAllHostIPAddresses ( ) { list ( $ start_ip , $ end_ip ) = $ this -> getIPAddressRangeAsInts ( ) ; if ( $ this -> getNetworkSize ( ) < 31 ) { $ start_ip += 1 ; $ end_ip -= 1 ; } for ( $ ip = $ start_ip ; $ ip <= $ end_ip ; $ ip ++ ) { yield long2ip ( $ ip ) ; } }
Get all host IP addresses
Removes broadcast and network address if they exist.

@return \Generator|string[]

@throws \RuntimeException if there is an error in the IP address range calculation
Get all host IP addresses Removes broadcast and network address if they exist .