Glossary Term
preg_replace_callback()
preg_replace_callback() — Perform a regular expression search and replace using a callback.
preg_replace_callback() — The behavior of this function is almost identical to preg_replace, except for the fact that instead of replacement parameter, one should specify a callback.
Inputs: pattern: The pattern to search for. It can be either a string or an array with strings. callback: A callback that will be called and passed an array of matched elements in the subject string. The callback should return the replacement string. This is the callback signature: stringhandler arraymatches subject: The string or an array with strings to search and replace. limit: The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit).
Returns: preg_replace_callback returns an array if the subject parameter is an array, or a string otherwise. On errors the return value is null If matches are found, the new subject will be returned, otherwise subject will be returned unchanged.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
