Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77448 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19587 invoked from network); 22 Sep 2014 09:56:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2014 09:56:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.50 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.218.50 mail-oi0-f50.google.com Received: from [209.85.218.50] ([209.85.218.50:41915] helo=mail-oi0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/24-33885-562FF145 for ; Mon, 22 Sep 2014 05:56:53 -0400 Received: by mail-oi0-f50.google.com with SMTP id a141so2895388oig.9 for ; Mon, 22 Sep 2014 02:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZHO0XYdPwRFB7vwJtpNgVnACJ/ejb6T1bdfMFbN/cO0=; b=Loc6gLNhLv3vNvGg4gcqOdfm6W0QLBjesOsoGXQgkr9PpHf9R+r+DQ/pN+BAHQZ8Tv GgeZqzIHsTTVaF8/PakIU73SSvU2A1mn7geOJb/0G3hatfpk5fu0wOcHfVodkwjVy92n j6+UehqOcaT3CRw5xuY9qbEHJdUVP7l6Jyqd/3GhMwdPcGWe6P8wC0QGJlSvbgan47Vn 6hI8JN5EjEb9QtV4RMY1uDSCL4iNiJLbCioppsgCN6TF7txpga03NBOEkni1JlLWT4Ip BMU5/oj4nkdMQy9c+xDPxeCSBs1r7QEk4MJeqbI0ycQKEZLl5ogk2Fdle02lfksZbydn 4PMg== MIME-Version: 1.0 X-Received: by 10.60.174.3 with SMTP id bo3mr18096531oec.31.1411379810865; Mon, 22 Sep 2014 02:56:50 -0700 (PDT) Received: by 10.202.227.206 with HTTP; Mon, 22 Sep 2014 02:56:50 -0700 (PDT) Received: by 10.202.227.206 with HTTP; Mon, 22 Sep 2014 02:56:50 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Sep 2014 02:56:50 -0700 Message-ID: To: Pierre Joye Cc: PHP internals list Content-Type: multipart/alternative; boundary=089e011844ce4519b50503a478ef Subject: Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior From: kris.craig@gmail.com (Kris Craig) --089e011844ce4519b50503a478ef Content-Type: text/plain; charset=UTF-8 On Sep 22, 2014 2:16 AM, "Pierre Joye" wrote: > > On Mon, Sep 22, 2014 at 10:56 AM, Kris Craig wrote: > > > > On Sep 22, 2014 1:09 AM, "Pierre Joye" wrote: > >> > >> On Mon, Sep 22, 2014 at 9:07 AM, Kris Craig wrote: > >> > > >> > On Sep 21, 2014 11:52 PM, "Pierre Joye" wrote: > >> > >> Well, for what I can see users already take into account this part of > >> the issue then: > >> > >> https://github.com/search?l=php&q=checkdnsrr&type=Code&utf8=%E2%9C%93 > >> > >> changing the default will make create code compatibility between 5.x > >> and 7.x, killing the gains we may have by changing the default. > >> > >> Cheers, > >> -- > >> Pierre > >> > >> @pierrejoye | http://www.libgd.org > > > > That's why we have the option of just making that arg required without a > > default, which would be targetted for PHP 7. > > > I got that :) > > but now imagine one doing the following call now: > > checkdnsrr("myhost") == TRUE > > where only MX was set and we suddenly change the default to ANY but > ANY does not include MX, then the validation will simply fail and the > code will become either: Why doesn't ANY include MX? That also seems counter-intuitive, as one would assume that "ANY" would check for any type of record. > > checkdnsrr("myhost", 'MX') == TRUE > > and for what I see, most of the usages are done to valid emails. Hmm that hasn't been my experience, but regardless, they should be using checkmxrr() for that, anyway. As it stands now, the default behavior of checkdnsrr() just redundantly mirrors the behavior of another function and for no apparent reason. > > I am not saying I am against such changes, I only do not see the gains > but the possible pains in a couple of situations, these pains will > make migration harder with no technical gains from our side. I do think it would be a usability gain, if not a technical one. And I've long been of the opinion that major version increments like PHP 7 are the ideal time to implement such improvements, even despite some potential edge-case BC. What if we got rid of the option to change the default and instead just went with making both args required? --Kris > > Cheers, > -- > Pierre > > @pierrejoye | http://www.libgd.org --089e011844ce4519b50503a478ef--