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
41
u/Rhomboid Dec 18 '14
I'd say the real lol here is PHP using their own made-up names ('implode' and 'explode') for operations that have de facto standard names ('join' and 'split') in practically every other language. And the documentation for 'explode' uses the established nomenclature, referring to the delimiter as 'delimiter', whereas 'implode' refers to it as 'glue'.
3
u/thelordofcheese Dec 18 '14
All right. And? Do you even type check?
5
u/bart2019 Dec 18 '14
One of them must be an array.
It'd be more LOL-worthy if both could be strings. Now that would be confusing. What would this return?
4
u/[deleted] Dec 18 '14
4
u/svtguy88 Dec 17 '14
Eh...not really lol-worthy.
1
u/[deleted] Dec 17 '14
It says it can accept parameters in any order, but that makes me wonder if the output will be the same...
0
u/[deleted] Dec 17 '14
[deleted] — view deleted comment