original_string: public function getEntries($domain)
      {
          $hosts  = array();
          $weight = array();
  
          getmxrr($domain, $hosts, $weight);
  
          // sort MX priorities
          foreach ($hosts as $k => $host) {
              $this->mxs[$host] = $weight[$k];
          }
  
  
          asort($this->mxs);
  
          // add the hostname with 0 weight (RFC 2821)
          $this->mxs[$domain] = 0;
  
          return $this->mxs;
      }
code: public function getEntries($domain)
      {
          $hosts  = array();
          $weight = array();
  
          getmxrr($domain, $hosts, $weight);
  
          // sort MX priorities
          foreach ($hosts as $k => $host) {
              $this->mxs[$host] = $weight[$k];
          }
  
  
          asort($this->mxs);
  
          // add the hostname with 0 weight (RFC 2821)
          $this->mxs[$domain] = 0;
  
          return $this->mxs;
      }
code_tokens: public function getEntries ( $ domain ) { $ hosts = array ( ) ; $ weight = array ( ) ; getmxrr ( $ domain , $ hosts , $ weight ) ; // sort MX priorities foreach ( $ hosts as $ k => $ host ) { $ this -> mxs [ $ host ] = $ weight [ $ k ] ; } asort ( $ this -> mxs ) ; // add the hostname with 0 weight (RFC 2821) $ this -> mxs [ $ domain ] = 0 ; return $ this -> mxs ; }
docstring: Queries the DNS server for domain MX entries
  
  @param string $domain The domain MX entries
  
  @return array         MX hosts and their weights
docstring_tokens: Queries the DNS server for domain MX entries