IP2Location.php
private function readIp($version, $pos) {
    if (4 === $version) {
      // Read a standard PHP int
      return self::wrap32($this->readWord($pos));
    } elseif (6 === $version) {
      // Read as BCMath int (quad)
      return $this->readQuad($pos);
    } else {
      // unrecognized
      return false;
    }
  }
private function readIp($version, $pos) {
    if (4 === $version) {
      // Read a standard PHP int
      return self::wrap32($this->readWord($pos));
    } elseif (6 === $version) {
      // Read as BCMath int (quad)
      return $this->readQuad($pos);
    } else {
      // unrecognized
      return false;
    }
  }
private function readIp ( $ version , $ pos ) { if ( 4 === $ version ) { // Read a standard PHP int return self :: wrap32 ( $ this -> readWord ( $ pos ) ) ; } elseif ( 6 === $ version ) { // Read as BCMath int (quad) return $ this -> readQuad ( $ pos ) ; } else { // unrecognized return false ; } }
High level fucntion to read an IP address of the given version

@access private
@param int $version  IP version to read (either 4 or 6, returns false on anything else)
@param int $pos  Position to read from
@return int|string|boolean
High level fucntion to read an IP address of the given version