Bug #16959: ereg_replace returns wrong characters
| From: | hirokawa@php.net | Date: | Thu, 02 May 2002 06:25:53 +0000 |
| Subject: | Bug #16959: ereg_replace returns wrong characters | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-6691@lists.php.net to get a copy of this message | ||
From: hirokawa@php.net
Operating system: Linux and Win2K
PHP version: 4.2.0
PHP Bug Type: Regexps related
Bug description: ereg_replace returns wrong characters
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 bug report at http://bugs.php.net/?id=16959&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16959&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16959&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16959&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16959&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16959&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16959&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16959&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16959&r=submittedtwice