Hi Michal,

On Fri, Oct 7, 2016 at 6:47 PM, Michał Brzuchalski
<mic...@brzuchalski.com> wrote:
> 2016-10-07 11:21 GMT+02:00 Michał Brzuchalski <mic...@brzuchalski.com>:
>
>> How about complete rewrite with OOP? It could be implemented using Objects
>> like DateTime does.
>> I've got working implementation in userland https://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
yohg...@ohgaki.net

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to