rfc:checkdnsrr-default-type
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | rfc:checkdnsrr-default-type [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Request for Comments: | ||
+ | * RFC Version: 1.00 | ||
+ | * Target PHP Version: 5.7 & 7.0 | ||
+ | * Date: 2014-09-19 | ||
+ | * Author: Kris Craig < | ||
+ | * Status: Under Discussion | ||
+ | * First Published at: http:// | ||
+ | |||
+ | ===== Abstract ===== | ||
+ | |||
+ | This RFC proposes that the default behavior of the checkdnsrr() function be changed such that it no longer checks only for MX records by default. | ||
+ | |||
+ | ===== Background ===== | ||
+ | |||
+ | The checkdnsrr() function is used to check if a given hostname exists. | ||
+ | |||
+ | ===== Current Behavior ===== | ||
+ | |||
+ | The $type argument is currently optional and defaults to " | ||
+ | |||
+ | ===== The Problem ===== | ||
+ | |||
+ | The current behavior is very counter-intuitive because the function is most commonly used for general DNS lookups. | ||
+ | |||
+ | What makes this even more perplexing is the fact that there is already a function dedicated specifically for performing MX record lookups: | ||
+ | |||
+ | There does not appear to be any compelling use case for the default value for PHP's general DNS lookup function being " | ||
+ | |||
+ | ===== Solution #1 ===== | ||
+ | |||
+ | Change the default value of $type from " | ||
+ | |||
+ | ==== Pros ==== | ||
+ | |||
+ | This would be the most convenient and intuitive option for developers, as they'd only have to supply the hostname and it would return a general DNS lookup, which is what most people would expect. | ||
+ | |||
+ | ==== Cons ==== | ||
+ | |||
+ | Though the potential for BC breakage would be the same, this would make it much harder to spot since no error would be generated. | ||
+ | |||
+ | ===== Solution #2 ===== | ||
+ | |||
+ | Make the $type argument required. | ||
+ | |||
+ | ==== Pros ==== | ||
+ | |||
+ | For the relatively few instances in which a script is passing only one argument with the expectation that it be checking for " | ||
+ | |||
+ | ==== Cons ==== | ||
+ | |||
+ | The intuitive behavior for virtually any DNS lookup function/ | ||
+ | |||
+ | ===== Final Thoughts ===== | ||
+ | |||
+ | This one appears to be pretty much a no-brainer. | ||
+ | |||
+ | ===== Vote ===== | ||
+ | |||
+ | Though this could be reasonably interpreted as language-touching and otherwise, I'll err on the side of caution and require the greater 2/3 majority in order for this RFC to pass. A separate vote will be held simultaneously to determine which solution will be implemented if the RFC passes. | ||
+ | |||
+ | ===== Changelog ===== | ||
+ | |||
+ | Version 1.00 : Initial proposal. | ||
rfc/checkdnsrr-default-type.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1