src/Subnet.php
public function hasNext() {
        if (!isset($this->current)) {
            throw new BadMethodCallException('You need to call method "load()" first.');
        }

        for ($ipLong = $this->current; $ipLong <= $this->last; $ipLong++) {
            if ($this->isUsed($ipLong) === false) {
                return true;
            }
        }

        return false;
    }
public function hasNext() {
        if (!isset($this->current)) {
            throw new BadMethodCallException('You need to call method "load()" first.');
        }

        for ($ipLong = $this->current; $ipLong <= $this->last; $ipLong++) {
            if ($this->isUsed($ipLong) === false) {
                return true;
            }
        }

        return false;
    }
public function hasNext ( ) { if ( ! isset ( $ this -> current ) ) { throw new BadMethodCallException ( 'You need to call method "load()" first.' ) ; } for ( $ ipLong = $ this -> current ; $ ipLong <= $ this -> last ; $ ipLong ++ ) { if ( $ this -> isUsed ( $ ipLong ) === false ) { return true ; } } return false ; }
Is there a free IP address?

@return bool

@throws Exception on error
Is there a free IP address?