Bug #1311: str_replace() produces corrupt result

From: Date: Sat, 10 Apr 1999 21:55:40 +0000
Subject: Bug #1311: str_replace() produces corrupt result
Groups: php.dev 
Request: Send a blank email to php-dev+get-5016@lists.php.net to get a copy of this message
From: colin@whistler.net Operating system: SunOS 5.5.1 (Intel) PHP version: 3.0.6 PHP Bug Type: Misbehaving function Bug description: str_replace() produces corrupt result This script demonstrates the problem: $haystack = "Line 1<BR>Line 2<BR>Line 3"; $result = str_replace("<BR>","\n",$haystack); echo($result); The output of this script is: Line 1 Line 2 This is followed by about 65K of what appears to be random sections of memory as it contains swaths of unparsed PHP code and PHP-generated HTML from other scripts. PHP is compiled as an Apache module. I've also tested this script with PHP 3.0.7, compiled as CGI under Linux, with no problems. -- 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 (#5016) next »