Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP8.2 str_split function returns empty arrays for empty strings #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HuongNV13
Copy link

In PHP 8.2, the str_split function will returns empty arrays for empty strings.
See: https://php.watch/versions/8.2/str_split-empty-string-empty-array

We can use mb_str_split() instead

@mrubinsk
Copy link
Member

I don't see how this fixes "str_split function returns empty arrays for empty strings" since that IS the fixed behavior as of 8.2 and is the same behavior of the mb_str_split() function. What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants