preg_replace();
.
The pattern to search for. It can be either a string or an array with
.
The e modifier makes preg_replace() treat the replacement
PHP . : , PHP, PHP , preg_replace().
. pattern , . , , . , , .
replacement may contain references of the form \\n or (since PHP 4.0.4)
$n, . , n- . N 0 99, \0 $0 , . ( 1), . ( "\\" PHP).
When working with a replacement pattern where a backreference is
( : ), \1 . \11, , preg_replace(), \1 backreference 1, \11 backreference, . \ ${1} 1. $1 backreference, 1 .
When using the e modifier, this function escapes some characters
( ', ",\ NULL) , _. (, 'STRLEN (\' $1\') + StrLen (" $2")'). , PHP , , .
.
If subject is an array, then the search and replace is performed on
, value .
.
, . -1 ( ).
preg_replace() , subject .
If matches are found, the new object will be returned, otherwise it will be returned unchanged or NULL if an error occurs.