I'm drowning in PHP

Peter Corlett abuse at cabal.org.uk
Tue May 15 12:47:28 BST 2007

On Tue, May 15, 2007 at 12:14:34PM +0100, 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.

Well, that's easy to fix, you just escape anything ambiguous, just to make
sure that you get the ease of indexing into and slicing strings that we've
all come to know and love from UTF-8.

This particular encoding scheme has one up on UTF-8 though that the whole
string will need to be re-encoded after taking a slice.

Damn, I've missed the deadline for the OMGWTF coding contest. That would
have been sure to be a winner.

More information about the london.pm mailing list