Can someone explain what the 'e' flag does, or link me to somewhere that does? I couldn't find anything via google.
Example:
preg_replace("/a(b?)c/e", "search_foo_term('\$1')", $str);
Can someone explain what the 'e' flag does, or link me to somewhere that does? I couldn't find anything via google.
Example:
preg_replace("/a(b?)c/e", "search_foo_term('\$1')", $str);
http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
So given this example:
The replacement for the entire match will be what search_foo_term() returns when passed the match for b? .
The e flag is deprecated, mostly for security reasons. Use
preg_replace_callback
instead.