Re: String termination

From: Date: Fri, 12 Apr 2002 07:11:23 +0000
Subject: Re: String termination
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92728@lists.php.net to get a copy of this message
the zval struct in PHP is multifunctional and its string branch has length member. Much of the operations on string are with *_STRINGL() L comes from length. It is preferable php function to use the length instead of *_STRING macros which looks throug the string to find its end. Andrey ----- Original Message ----- From: "Marco Laponder" <mlr@interchain.nl> To: "'Php-General (E-mail)" <php-general@lists.php.net> Sent: Friday, April 12, 2002 9:49 AM Subject: [PHP] String termination > Hi All, > > I have the following question. I have been developing with C for a > while and I was used that the \0 indicated the end of a string. So if > I had a variable containing 1234\056789 and the variable was printed, > only 1234 was printed. > > As I can see in PHP (version 4.0.6 ), when I echo such a variable > also the characters are printed, even the characters after \0. Is this > the case PHP should work or is it a bug ? Isn't \0 really a string > termination character in PHP ? > > I have been searching for documentation on this matter so if anyone > could help me... > > Kind Regards, > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#92728) next »