preg_replace() in PHP
The preg_replace() function in PHP returns a string or array of strings where all matches of a pattern or list of patterns found in the input are replaced with substrings.
The /e modifier will cause the function preg_replace() to evaluate new value as 'PHP code' before submitting the substitution. Note thatPCRE_REPLACE_EVAL
(/e
) has been deprecated as of PHP 5.5.0.
How to detect and validate
How to RCE
Another example
Last updated