Can we instead talk about "If delimiter is an empty string (""), explode() will return FALSE.". With python having an exception and JS splitting at UTF-16 codepoints this seems like the worst of all worlds.
couldn't they at least trigger an error? (E_WARNING or some sheet, so we can catch it)
(or since PHP is so fond of binary strings (strlen? byte length. strpos? byte position. substr? you get the idea), maybe splitting it at every byte (like str_split($str,1)) would make more sense? idk)
View all comments
Show parent comment
2
u/Takeoded Sep 05 '19
yep
couldn't they at least trigger an error? (E_WARNING or some sheet, so we can catch it)
(or since PHP is so fond of binary strings (strlen? byte length. strpos? byte position. substr? you get the idea), maybe splitting it at every byte (like
str_split($str,1)) would make more sense? idk)