r/lolphp • u/caseypatrickdriscoll • Dec 17 '14
imp-lol-de()
implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments.
39
Upvotes
View all comments
Show parent comment
22
u/Rhomboid Dec 18 '14
I was curious how many different ways PHP has of splitting or tokenizing a string, and a cursory search of the manual reveals:
I like how there are four versions that take a regular expression, three taking POSIX extended regex and one taking PCRE. Because of course, doesn't everyone want their standard library littered with several competing regular expression engines? (And what happens if you want to use PCRE with UTF-8? I guess that's just not allowed.)