IP2Location.php
private function readIddAndAreaCodes($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $iddCode  = self::INVALID_IP_ADDRESS;
      $areaCode = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::IDD_CODE][$this->type]) {
      // If the field is not suported, return accordingly
      $iddCode  = self::FIELD_NOT_SUPPORTED;
      $areaCode = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read IDD and area codes
      $iddCode  = $this->readString($pointer + self::$columns[self::IDD_CODE][$this->type]);
      $areaCode = $this->readString($pointer + self::$columns[self::AREA_CODE][$this->type]);
    }
    return [$iddCode, $areaCode];
  }
private function readIddAndAreaCodes($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $iddCode  = self::INVALID_IP_ADDRESS;
      $areaCode = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::IDD_CODE][$this->type]) {
      // If the field is not suported, return accordingly
      $iddCode  = self::FIELD_NOT_SUPPORTED;
      $areaCode = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read IDD and area codes
      $iddCode  = $this->readString($pointer + self::$columns[self::IDD_CODE][$this->type]);
      $areaCode = $this->readString($pointer + self::$columns[self::AREA_CODE][$this->type]);
    }
    return [$iddCode, $areaCode];
  }
private function readIddAndAreaCodes ( $ pointer ) { if ( false === $ pointer ) { // Deal with invalid IPs $ iddCode = self :: INVALID_IP_ADDRESS ; $ areaCode = self :: INVALID_IP_ADDRESS ; } elseif ( 0 === self :: $ columns [ self :: IDD_CODE ] [ $ this -> type ] ) { // If the field is not suported, return accordingly $ iddCode = self :: FIELD_NOT_SUPPORTED ; $ areaCode = self :: FIELD_NOT_SUPPORTED ; } else { // Read IDD and area codes $ iddCode = $ this -> readString ( $ pointer + self :: $ columns [ self :: IDD_CODE ] [ $ this -> type ] ) ; $ areaCode = $ this -> readString ( $ pointer + self :: $ columns [ self :: AREA_CODE ] [ $ this -> type ] ) ; } return [ $ iddCode , $ areaCode ] ; }
High level function to fetch the IDD and area codes

@access private
@param int $pointer  Position to read from, if false, return self::INVALID_IP_ADDRESS
@return array
High level function to fetch the IDD and area codes