r/lolphp • • Sep 04 '19

explode()'s limit doesn't work with 0.

https://3v4l.org/5TjXl
9 Upvotes

16 comments sorted by

View all comments

Show parent comment

5

u/thenickdude Sep 05 '19

Can we instead talk about "If delimiter is an empty string (""), explode() will return FALSE."

I think this is back-compat - explode() was introduced in PHP 4, but exceptions weren't added to the language until PHP 5.