I'm drowning in PHP

Andy Armstrong andy at hexten.net
Tue May 15 12:57:17 BST 2007


On 15 May 2007, at 12:36, Daniel Barlow wrote:
> Andy Armstrong wrote:
>> That'd be fun! Scan forward until you get a value that matches how  
>> far you've come. The worst of both worlds /and/ subtle bugs when  
>> the content of the string happens to look like a plausible length.  
>> It's a winner.
>
> For extra marks, decree that strings are encoded as utf8, but store  
> the length in characters not length in octets

And have a load of edge-case-ridden logic to adjust the utf8 encoding  
dynamically to avoid length / data confusion?

-- 
Andy Armstrong, hexten.net



More information about the london.pm mailing list