Re: [RFC] Bug #72811 - Replacing parse_url()

From: Date: Fri, 07 Oct 2016 10:55:30 +0000
Subject: Re: [RFC] Bug #72811 - Replacing parse_url()
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-96284@lists.php.net to get a copy of this message
Hi Michal, On Fri, Oct 7, 2016 at 6:47 PM, MichaÅ‚ Brzuchalski <michal@brzuchalski.com> wrote: > 2016-10-07 11:21 GMT+02:00 MichaÅ‚ Brzuchalski <michal@brzuchalski.com>: > >> How about complete rewrite with OOP? It could be implemented using Objects >> like DateTime does. >> I've got working implementation in userland _H/Ä8 >> LÍÍY/w,›khttps://github.com/madkom/uri it >> maybe not be finished yet but supports parsing URI with IPv4, IPv6 and >> Hostnames. >> It was also going to parse query arguments from URI depending on how to >> parse multiple arguments: >> * some languages parses ?arg1=1&arg1=2 as an array, PHP >> parses only last, >> * ?arg1[]=1&arg1=3 some parses adding element 3 to >> "arg1" array some >> replaces) >> >> This implementation also supports UriTemplates (" >> http://localhost/{module}/action") and UriReferences >> ("/some/reference?arg1=2#fragment"). >> > > My proposed impl supports parsing and building, I can see there is possible > to move functionalities from few global functions into one OO written > package. This is about internal C module implementation. re2c is one of the best way to write manageable BNF definition implementation. We use re2c many places already. Therefore, re2c implementation is the way to go. IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#96284) next »