Hi Matthew, I'm not even sure what to argue for given we only have PHP5 now ;). I do know IRI's are gaining popularity across Asia and Europe, and that the current Zend_Uri class is incapable of validating an IRI. So my feeling would be to call Zend_Uri incomplete, rather than a class which is stable and can be safely optimised - which is partly why one would use parse_url(). It borders on premature optimisation unless you want an ASCII only class.
At the end, if IRI support is a goal, which it should be in some form (noting it's very difficult in reality since the character ranges differ per root - something for the Locale team I think - so IRI support would be very helpful) then switching to parse_url() doesn't offer anything advantageous. At least using PCRE allows the possibility of matching against a range of Unicode characters - obviously PHP6 would be cool but it's not here and for IRI support I doubt we can wait for it. Otherwise what will all those Belgian users do when they realise all those ZF applications are refusing to accept their website addresses? Not to mention everyone else capable of registering IRIs and who doesn't write exclusively in ASCII characters... Best regards, Pádraic Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com ----- Original Message ---- From: Matthew Turland <[EMAIL PROTECTED]> To: Pádraic Brady <[EMAIL PROTECTED]> Sent: Sunday, February 25, 2007 9:33:37 PM Subject: Re: [fw-general] Zend_Uri_Http? Does the current implementation support IRIs though? I wouldn't think that would be possible without Unicode support, which AFAIK no PHP functions will have until PHP 6. If I'm correct, that doesn't seem to be an argument in favor of or against either implementation. On 2/25/07, Pádraic Brady <[EMAIL PROTECTED]> wrote: Not entirely sure, but would parse_url() be capable of parsing of an IRI? Bear in mind an IRI (equally valid as an URI) can contain a wide variety of international characters. I just did a very quick check and it doesn't seem to return the string as is, so the current method may be ultimately the better (at least until PHP6 ;)). Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com ----- Original Message ---- From: Matthew Turland <[EMAIL PROTECTED]> To: Zend Framework < fw-general@lists.zend.com> Sent: Sunday, February 25, 2007 8:03:07 PM Subject: [fw-general] Zend_Uri_Http? Is there a particular reason that Zend_Uri_Http uses PCRE for its underlying implementation instead of basically just wrapping parse_url()? As far as I can tell, the current implementation and parse_url() are equally capable of returning the data fragments that the class makes available (and correct me if I'm wrong on this). The current implementation has two main disadvantages over parse_url(): 1) the current implementation requires the PCRE extension which, though enabled by default, may not be available to (or needed by) all users, whereas parse_url() is part of the core; 2) the current implementation is in PHP whereas parse_url() is in C, so I'm willing to bet there's a performance advantage (albeit one that's not extremely substantial, but I don't have any figures to back that up). I would imagine there is a good reason that I'm just not seeing and I'm just curious to see what it is. If there's no good reason not to, I'd be willing to come up with an alternate implementation and run some benchmarks and report my findings on the list. Regards, Matthew Turland Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. ____________________________________________________________________________________ No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail