Isn't this just basically renaming
str_replace? From a deployment standpoint, I'm not sure a prettier function is worth the cost of a dependency. There's really no
actual gain.
However, if you were to create a function that utilizies
preg_replace (or
ereg_replace, respectively) to help simplify the joys of
Regex for some of the greener developers, that would probably be more well adopted.
I'm not knocking it, I think it's great that someone is taking an initiative. I'm just thinking down the road, as a developer, of possible support quandries that could arise when having to explain to end users about dependencies, etc.