I'm drowning in PHP

Richard Foley Richard.Foley at rfi.net
Tue May 15 11:40:32 BST 2007


On Tuesday 15 May 2007 12:20, Andy Armstrong wrote:
> On 15 May 2007, at 11:04, Jonathan Rockway wrote:
> > On Monday 14 May 2007 10:12:31 pm Andy Armstrong wrote:
> >> This is a small gem from some PHP I'm obliged to look at:
> >>      for($i=0; $i<strlen($str); $i++) {
> >
> > Ah, the classic O(n^2) for loop.  Haven't seen that one for quite a  
> > while,
> > especially not in a language with built-in regexes.  Gotta love PHP...
> 
> I imagine PHP stores the length of the string rather than using a  
> sentinel at the end. At least I really *hope* PHP stores the length...
> 
You need a 'proper' job: see one of those 12 Perl job proposals Nick was on 
about earlier ;-)

-- 
Richard Foley
Ciao - shorter than aufwiedersehen

http://www.rfi.net/


More information about the london.pm mailing list