From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.3
PHP version:      4.0.5
PHP Bug Type:     PCRE related
Bug description:  escaping doesn't work in the replacement clause

The problem is that preg_replace() ignores escaping of $nn sequence in the replacement 
string.
<?
$str = preg_replace("/a/", "\$1000", "test ... a ... test");
echo $str;
?>

test ... 00 ... test 

-----------
#!/usr/local/bin/perl -w

$_ = "test ... a ... test";
s/a/\$1000/;
print;
-----------
test ... $1000 ... test

This feature leads to impossibility of passing strings like '$1000' via phplib 
template variables.

PHP 4.0.4pl1, 4.0.5


-- 
Edit Bug report at: http://bugs.php.net/?id=10626&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to