Bug #16959 Updated: ereg_replace returns wrong characters

From: Date: Tue, 21 May 2002 11:04:48 +0000
Subject: Bug #16959 Updated: ereg_replace returns wrong characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-8087@lists.php.net to get a copy of this message
ID: 16959 Updated by: tom@scl.co.uk Reported By: hirokawa@php.net Status: Open Bug Type: Regexps related Operating System: Linux and Win2K PHP Version: 4.2.0 New Comment: I have had this problem too, I posted a bug report about it on the 24 April and Yohgaki responded asking me to put some code up, I did but he never responded again. I'm supprised that this bug hasn't been fixed because it's a real show stopper for us and it is causing alot of problems because we need some stuff from php 4.2.x but we can't upgrade because all our other code breaks and I imagine there are loads of other people in the same situation. Previous Comments: ------------------------------------------------------------------------ [2002-05-02 02:25:53] hirokawa@php.net This is small script for testing. <?php $pat = "(^|&)foo(&|$)"; $string = "foo"; echo ereg_replace($pat, "\\1", $string); ?> In PHP <= 4.1.x, this script returns empty string. But, PHP 4.2.0 and PHP 4.2.1RC1 return '\1'. The return value in PHP >= 4.2.0 should be corrected. ereg_replace() is used for session id propagation in GET mode of PHPlib. It is not work well because it is affected by this problem. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16959&edit=1

« previous php.bugs (#8087) next »