mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
fix bug #40395: document which chars are escaped when running with '/e' modifier
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@229572 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
bd40a5960a
commit
cce3db21a1
1 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.22 $ -->
|
||||
<!-- $Revision: 1.23 $ -->
|
||||
<refentry id="function.preg-replace">
|
||||
<refnamediv>
|
||||
<refname>preg_replace</refname>
|
||||
|
@ -83,6 +83,17 @@
|
|||
<literal>$1</literal> backreference, leaving the <literal>1</literal>
|
||||
as a literal.
|
||||
</para>
|
||||
<para>
|
||||
When using the <literal>e</literal> modifier, this function escapes
|
||||
some characters (namely <literal>'</literal>, <literal>"</literal>,
|
||||
<literal>\</literal> and NULL) in the strings that replace the
|
||||
backreferences. This is done to ensure that no syntax errors arrise
|
||||
from backreference usage with either single or double quotes (e.g.
|
||||
<literal>'strlen(\'$1\')+strlen("$2")'</literal>). Make sure you are
|
||||
aware of PHP's <link linkend="language.types.string">string
|
||||
syntax</link> to know exactly how the interpreted string will look
|
||||
like.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
|
Loading…
Reference in a new issue