php-scalar-objects
php-scalar-objects copied to clipboard
String.replace()
Hey,
while I do like the two prototypes for String.replace() it's actually an issue to properly document these two methods. I think it would be better to split them into two methods.
-
String.replace($search, $replacement)and -
String.replaceMap(array $replacementMap)
While I'm not sure about the replaceMap method name. Suggestions are welcome.
gossi
I just stumbled upon supplant which is a perfect method name for the latter case. I'd go with it in my own repo gossi/oophp.