ID: 16959 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Regexps related Operating System: Linux and Win2K PHP Version: 4.2.0 New Comment:
I can't recreate this problem in current HEAD. I get an empty string returned from this test script so I will assume this is fixed unless you can provide a test script that does the wrong thing in the current code. See http://snaps.php.net to grab a copy of the current code. Previous Comments: ------------------------------------------------------------------------ [2002-05-21 07:04:47] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [2002-05-02 02:25:53] [EMAIL PROTECTED] 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