PHP and mbstring

Russ Garrett rg at
Wed Dec 15 15:12:58 PST 2004

On Thu, 2004-12-16 at 01:58 +0300, Antony Dovgal wrote:
> On Wed, 15 Dec 2004 14:49:56 -0800
> Ian Kallen <spidaman at> wrote:
> > Timo Ewald's PHP memcached-client submission from the other day seemed
> > to work fine except for the brain-dead semantics of PHP's strlen...
> > The code I'm working with has mbstring compiled for multibyte
> > charcters. The client code needs to know the length in bytes of data
> > payloads, not character counts. So I patched it with the attached
> > modifications to make it work.
> Since when PHP's strlen() returns character count instead of byte count?
> Or you meant that you need to know _character count_, not _byte count_? 

When (mbstring.func_overload & 2) == true.

We had a similar patch going when we used the pure PHP client - we've
since moved to the PECL which is much more satisfatory.


More information about the memcached mailing list