PHP » GoLang |
login |
register |
about
|
GoLang preg_replace_callbackGoLang replacement for PHP's preg_replace_callback [Golang Play | edit | history]
preg_replace_callback(PHP 4 >= 4.0.5, PHP 5, PHP 7) preg_replace_callback — Perform a regular expression search and replace using a callback Description
mixed preg_replace_callback
( mixed
$pattern
, callable $callback
, mixed $subject
[, int $limit = -1
[, int &$count
]] )
The behavior of this function is almost identical to
preg_replace(), except for the fact that instead of
Parameters
Return Values
preg_replace_callback() returns an array if the
If matches are found, the new subject will be returned, otherwise
Changelog
Examples
Example #2 preg_replace_callback() example
<?php The above example will output: April fools day is 04/01/2003 Last christmas was 12/24/2002
Example #3 preg_replace_callback() using recursive structure to handle encapsulated BB code
<?php See Also
|
more
Recently updated
more
Most requested
more
Last requests
|