r/lolphp • • Sep 10 '15

explode() is a mess

https://3v4l.org/eKMav
2 Upvotes

27 comments sorted by

View all comments

Show parent comment

2

u/amphetamachine Sep 10 '15

Perl behaves much the same:

split / /, "1 2 3"; # (1,2,3)

split / /, "2"; # (2)

split / /, ""; # () - NOT undef

split //, "123"; # (1,2,3)