On Thu, Oct 6, 2016 at 11:19 AM Christoph M. Becker <cmbecke...@gmx.de>
wrote:

So, I basically see two options:

  * wait until PHP 8 (whenever that'll be released) and switch the
    implementation of parse_url() then – what might delay the adoption
    of PHP 8

  * add a new function in PHP 7.2 (maybe called parse_uri()), and
    perhaps deprecate parse_url() at the same time


I'd probably side more with the former, but as a hybrid?  As a stickler for
naming parse_url() also seems to parses URN's correctly.  imo, the proper
name would be parse_uri() for something that can correctly parse any URI
per the RFC.

Would it be plausible to blend the options by [sorry if this is a faux pas
I'm not familiar with yet]
* PHP 7.2+
  * Adding parse_uri() as the new RFC compliant parser
  * Deprecating the functionality of parse_url() with notice that parser
will change to that of parse_uri()

* PHP 8.0
  * Alias parse_url() to be parse_uri()
  * Deprecate parse_url() for the name (or just let it exist as a alias
forever)

Obviously having two UR* parsers for the long-term would be a poor option,
this might enable people to migrate to the new name & parser, before PHP 8
becomes a reality.

--
Dave

Reply via email to