/** * @return int */ public function count() { if ($this->firstIP->getVersion() === IP::IP_V4) { $count = $this->lastIP->toLong() - $this->firstIP->toLong(); } else { $count = bcsub($this->lastIP->toLong(), $this->firstIP->toLong()); } return $count; }
/** * @return int */ public function count() { return (int) bcadd(bcsub($this->lastIP->toLong(), $this->firstIP->toLong()), 1); }