Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96280 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95414 invoked from network); 7 Oct 2016 06:38:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2016 06:38:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:38764] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/94-23443-EE247F75 for ; Fri, 07 Oct 2016 02:38:38 -0400 Received: by mail-wm0-f50.google.com with SMTP id i130so16010529wmg.1 for ; Thu, 06 Oct 2016 23:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YLsUg9utrepP25pq8RkwX7pI0fj+u1/u6S8UBm+GlBE=; b=dYolHCbeyfWVGwqYUjAi6BLmlB4eMhpFqK3s4fU07DajxgNLo2wUKa9JUR0obfIKmn a00vgPz+mEl/6fPWk9EtkLJnJHWgS5cflT5g7XvFta0RTGVh9ia2KmJ71CdTTYmUHeX7 S7nn2rHJzkO8Kg84E7BQxME7nOALiBF1GFN5efAHGwYlNW+l3Cl5lUJsgt6/7Up3p8Mc elF6cLpO5clyYdC12Q/IHZQ0OCc+oScmZ9OicbID2G0yV2Kw3rbB3xbDwR2s7mOZJ4Gs JIVN3ikDWYu+VZjGyP0Ij7JwN+dBovdqeXjZfHKR+OFy655fMhiaz9pNgLdIx5hkcMYc PVRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YLsUg9utrepP25pq8RkwX7pI0fj+u1/u6S8UBm+GlBE=; b=RecDsgAJAc1BK3vIvtu035xmh07asq0m/HZDN+A3Pq79OSMayb28N6Eo1Kfje0QJ7w Gr4bWC089kO2vQJGOE6O0acnjpcSlRbUwg/PoEs5ofNofmMHmlA5JBAgiiSiMebEloF+ fwYUf9uTj9qZ8upERmyJkYSpIogkU+K3IizhKqkHLz/FG4f0DjXr6lS3zd6A0dYCij5Y v8R/Wu/huYnN8EWK6iBSwfsufUOx6YRJQBsSRyv7yDiEcZhjOJeHmkz5hL7TuRetFfhj 6KIktA4nyFOxMJCYyt0N1U8Pc6ZQHE1z5v8+YRlJtTB53Q9S0nqToJZo7jplbFao72vc 82bw== X-Gm-Message-State: AA6/9RlYFqFzPYUxkEmaDfO8QlKsXWRhz5aP3tsEh7vj8Pb0MFW16p6vrPkOZDfm2NDtewineGRXJh3gnYNsjQ== X-Received: by 10.28.167.213 with SMTP id q204mr18809169wme.76.1475822314788; Thu, 06 Oct 2016 23:38:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.109.170 with HTTP; Thu, 6 Oct 2016 23:38:14 -0700 (PDT) In-Reply-To: References: Date: Fri, 7 Oct 2016 08:38:14 +0200 Message-ID: To: David Walker Cc: Stephen Reay , PHP internals Content-Type: multipart/alternative; boundary=001a114b3e36d31d9b053e40a820 Subject: Re: [PHP-DEV] [RFC] Bug #72811 - Replacing parse_url() From: ocramius@gmail.com (Marco Pivetta) --001a114b3e36d31d9b053e40a820 Content-Type: text/plain; charset=UTF-8 On Fri, Oct 7, 2016 at 8:32 AM, David Walker wrote: > On Thu, Oct 6, 2016 at 10:13 PM Stephen Reay > wrote: > > > Could the new URL parser be exposed via a third parameter to parse_url, > > which defaults to false/off in 7.2 (or whenever its added) but then > > defaults to true in 8.0? > > > I, personally, would be opposed to this. Firstly, it doesn't alert users > to the previous functionality being non-standards compliant. Secondly it > allows the previous parser to exist in it's current state for a longer > period of time, then in 8.0 exist as a function parameter. The goal should > be to drop the standards-uncompliant version at some point. > > > > Additionally, would(could) this same url parser be used for > > FILTER_VALIDATE_URL, which currently states (in the docs) that it matches > > RFC2396, and indeed it appears not to accept an IPv6 host segment. > > > > I haven't yet looked at to how filter validation exists in conjunction with > parse_url(), however as noted ( > http://php.net/manual/en/filter.filters.validate.php#110411) the > FILTER_VALIDATE_URL, may be strict to URL's not URN's. Maybe, a future > scope could be to look at filter_var() and how it uses that filter type. > Maybe could add a proper FILTER_VALIDATE_URI, or something. > > However that would be outside the scope of this RFC for right now, I > believe. > > -- > Dave > Like with any software rewrite project, remember that software rewrites usually fail. It's probably better to deprecate the function, make a new one, then code the newer implementation there, and let users migrate. This is necessary to mitigate the risk of BC breaks. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --001a114b3e36d31d9b053e40a820--