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 
$str = preg_replace("/a/", "\$1000", "test ... a ... test");
echo $str;

test ... 00 ... test 

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

$_ = "test ... a ... test";
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:

PHP Development Mailing List <>
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