PHP 4.0 Bug #4725: preg_replace is not binary save

From: Date: Wed, 31 May 2000 11:23:35 +0000
Subject: PHP 4.0 Bug #4725: preg_replace is not binary save
Groups: php.dev 
Request: Send a blank email to php-dev+get-19867@lists.php.net to get a copy of this message
From: tom.anheyer@berlinonline.de Operating system: Linux 2.2.14 i686 (Redhat 5.2) PHP version: 4.0.0 Release PHP Bug Type: Misbehaving function Bug description: preg_replace is not binary save the following code illustrates the problem: <? $str = "\0test\0"; echo "pre preg_replace: " . strlen($str) . "<br>\n"; $str = preg_replace('/test/', 'ok', $str); echo "post preg_replace: " . strlen($str) . "<br>\n"; ?> ./configure --with-apxs=/usr/sbin/apxs --with-gd=/usr --with-mysql=/usr --with-config-file-path=/home/httpd/conf --enable-track-vars --enable-memory-limit --enable-sysvsem --enable-sysvshm --disable-xml --disable-debug --enable-inline-optimization

« previous php.dev (#19867) next »