Bug #11594: preg_replace is not working with backslash $

From: Date: Wed, 20 Jun 2001 21:40:55 +0000
Subject: Bug #11594: preg_replace is not working with backslash $
Groups: php.dev 
Request: Send a blank email to php-dev+get-57474@lists.php.net to get a copy of this message
From: PWMoosman@aol.com Operating system: Solaris PHP version: 4.0.5 PHP Bug Type: PCRE related Bug description: preg_replace is not working with backslash $ I'm trying to use preg_replace to replace $ with \$. Here is a sample script: <? $data = '$_hello_$world'; $data = preg_replace('/\$/i','\$',$data); print "data : $data\n"; ?> I expect the script to output \$_hello_\$world. However, version 4.0.5 is outputing $_hello_$world. This worked in version 4.0.4 It possible this bug is related to bug# 10668 -- Edit Bug report at: http://bugs.php.net/?id=11594&edit=1

« previous php.dev (#57474) next »