explode() in Str::class #51971
danielgestwa
started this conversation in
Polls
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Last week I was working with Str explode() function which works exactly like PHP one, so:
explode(';', 'asd')
array(1) {[0] => string(0) "asd"}
explode(';', '')
array(1) {[0] => string(0) ""}
Str::of('')->explode(';')
array(1) {[0] => string(0) ""}
BUT, for me it should work like this:
explode(';', 'asd')
array(1) {[0] => string(0) "asd"}
explode(';', '')
array(1) {[0] => string(0) ""}
Str::of('')->explode(';')
array(0) {}
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions