note 23572 added to function.preg-replace

From: Date: Tue, 23 Jul 2002 02:58:36 +0000
Subject: note 23572 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-33397@lists.php.net to get a copy of this message
furthermore, this page should have an official reference to 'addslashes()' which it does on all $1...$n substitutions - prefixing \,'," into \\,\',\". This interferes heavily with /e - if you put "my_call('$1')" then the singlequotes will interpolate \\ and \' but not \". If you use "my_call(\"$1\") then it will interpolate \" and \\ but not \' . Whichever you use, the target function has to run an extra str_replace to ensure to get the original string that was captured. All this is due to the fact that php's doublequoted strings are inherently ill-featured. See http://www.php.net/manual/en/language.types.string.php -- http://www.php.net/manual/en/function.preg-replace.php http://master.php.net/manage/user-notes.php?action=edit+23572 http://master.php.net/manage/user-notes.php?action=delete+23572 http://master.php.net/manage/user-notes.php?action=reject+23572

« previous php.notes (#33397) next »