On Sep 22, 2014 2:16 AM, "Pierre Joye" <pierre....@gmail.com> wrote:
>
> On Mon, Sep 22, 2014 at 10:56 AM, Kris Craig <kris.cr...@gmail.com> wrote:
> >
> > On Sep 22, 2014 1:09 AM, "Pierre Joye" <pierre....@gmail.com> wrote:
> >>
> >> On Mon, Sep 22, 2014 at 9:07 AM, Kris Craig <kris.cr...@gmail.com>
wrote:
> >> >
> >> > On Sep 21, 2014 11:52 PM, "Pierre Joye" <pierre....@gmail.com> 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

Reply via email to