note 23572 deleted from function.preg-replace by sniper
| From: | sniper@php.net | Date: | Sun, 07 Sep 2003 22:05:48 +0000 |
| Subject: | note 23572 deleted from function.preg-replace by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55703@lists.php.net to get a copy of this message | ||
Note Submitter: guidod@gmx.de
----
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