php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4725 preg_replace is not binary save
Submitted: 2000-05-31 13:23 UTC Modified: 2000-06-01 18:35 UTC
From: tom dot anheyer at berlinonline dot de Assigned: andrei (profile)
Status: Closed Package: Misbehaving function
PHP Version: 4.0.0 Release OS: Linux 2.2.14 i686 (Redhat 5.2)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tom dot anheyer at berlinonline dot de
New email:
PHP Version: OS:

 

 [2000-05-31 13:23 UTC] tom dot anheyer at berlinonline dot de
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-31 20:18 UTC] andrei at cvs dot php dot net
Yes, it does have that problem. I plan to work on it in the near future.
 [2000-06-01 18:35 UTC] andrei at cvs dot php dot net
This has been fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 18:01:35 2024 UTC