Re: New function bytesize()

From: Date: Wed, 19 Jul 2000 14:34:34 +0000
Subject: Re: New function bytesize()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-25116@lists.php.net to get a copy of this message
sizeof(char) * strlen(string) better plan? On Wed, 19 Jul 2000, Andrei Zmievski wrote: > On Wed, 19 Jul 2000, Stanislav Malyshev wrote: > > MK(>> But ehm I have this silly question. > > MK(>> sizeof(string) = strlen(string) right? > > > > No. sizeof(string) = strlen(string) + 1. In PHP, though, length of string > > and actual buffer size allocated for that string can significantly differ. > > Look for example at fgets code. > > Don't forget that this is not true for Unicode and MBCS. > > -Andrei > * Reality isn't all it's cracked up to be. * >

« previous php.dev (#25116) next »