diff --git a/reference/pcre/functions/preg-replace.xml b/reference/pcre/functions/preg-replace.xml index 47849dd742..0ef9f6a748 100644 --- a/reference/pcre/functions/preg-replace.xml +++ b/reference/pcre/functions/preg-replace.xml @@ -1,5 +1,5 @@ - + preg_replace @@ -83,6 +83,17 @@ $1 backreference, leaving the 1 as a literal. + + When using the e modifier, this function escapes + some characters (namely ', ", + \ 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. + 'strlen(\'$1\')+strlen("$2")'). Make sure you are + aware of PHP's string + syntax to know exactly how the interpreted string will look + like. +