Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77346 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21679 invoked from network); 19 Sep 2014 17:24:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2014 17:24:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.176 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.176 mail-ie0-f176.google.com Received: from [209.85.223.176] ([209.85.223.176:55844] helo=mail-ie0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/51-13213-6E66C145 for ; Fri, 19 Sep 2014 13:24:54 -0400 Received: by mail-ie0-f176.google.com with SMTP id ar1so3983302iec.21 for ; Fri, 19 Sep 2014 10:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ESMt47TpDR2IRBEOZxGR3EtN65tSBVt4+3Sm9PljFx4=; b=mD/d5K1QwlkGQtIp6kR1ISWRwVrOBL780QOVT1wJjMNqs8YuswsMhbUpUD+dLithtC JLQhHxj/68xrNdk+iiAz+NZubzRibkahtwTKTJBi2hE4YQPRc2UbYmO7H2gFW6W1YnzA eyXVP+/VIEOLbzBSFSrkz6r2z3aO5MbRsYZW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=ESMt47TpDR2IRBEOZxGR3EtN65tSBVt4+3Sm9PljFx4=; b=i4G5CSJUdl/PeasZi4dNxDnEN44FKIouzMZVqAuAwjatr0LldAxOOgnmw/0hlP4ez1 pDerJrae24BRWqzWMXBTQq+AKP2hk0+EuzyGjErZI7bkS/xcLeBxgPoH1Mr6F3V3cxqV 6rlCoN9eMt71QFuoCO8xpEPiyChNBJO2soL5ZYI+ZxJ5mJ/ydKQr9pIqoYmY2Lw3ZrRW exgZva4FdLUv9ziEnJVyTQb3ixr9UY1PX+DmD8jC3JXMUxmDgy6bG9jpQ8U0CQcftYCe 3YVICXfAgOgK25q7scFgB+X7pjykSHzwk20zEsKmQYZlaExyuQOmPL28ns2gf76pLktX COwA== X-Gm-Message-State: ALoCoQn+jP389GwpzwEAexxo38HcfenMKpDvPWhm6fbTQe0anp8zjowIbmvjvxjePxCvR0Xz8jvf X-Received: by 10.50.41.104 with SMTP id e8mr56267310igl.35.1411147491608; Fri, 19 Sep 2014 10:24:51 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.43.70.143 with HTTP; Fri, 19 Sep 2014 10:24:31 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Sep 2014 10:24:31 -0700 X-Google-Sender-Auth: q1S8vyR4xlk9sv78NGyC5rYVHrU Message-ID: To: Chris Wright Cc: Kris Craig , PHP internals list Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Why does checkdnsrr() default to MX?? From: aharvey@php.net (Adam Harvey) On 19 September 2014 02:58, Chris Wright wrote: > On 18 September 2014 20:29, Kris Craig wrote: >> Hey guys, >> >> I just spent some time troubleshooting what appeared to be a DNS issue >> before I realized that, absent the optional $type argument, checkdnsrr() >> defaults to "MX". Can anybody explain why it's defaulting to "MX" and not >> "ANY"? It seems really counter-intuitive. > > This is a big wtf, especially since getmxrr() exists. A cursory search > of github (not the best measure I know, but easy) reveals only a few > cases where this function is called without the second argument, and > every case I've found looks like they were expecting an A record, so > this code is likely broken anyway. > > In other words, +1 to change this to something saner ASAP. As an alternative, could we just make the type argument mandatory in PHP 7 and start issuing E_DEPRECATED warnings if it's omitted in 5.6 or 5.7? Adam