Bug #1386: Substr & chr(0)

From: Date: Fri, 07 May 1999 13:38:21 +0000
Subject: Bug #1386: Substr & chr(0)
Groups: php.dev 
Request: Send a blank email to php-dev+get-5405@lists.php.net to get a copy of this message
From: lemming@k332.feld.cvut.cz Operating system: Linux 2.x PHP version: 3.0.7 PHP Bug Type: Misbehaving function Bug description: Substr & chr(0) substr does not correctly return substrings of strings containing null characters. Following code should print: 1 1 but it prints: 1 0 <? echo strlen(substr(chr(65).chr(65),0,1))."\n"; echo strlen(substr(chr(0).chr(0),0,1))."\n"; ?> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5405) next »