Can't the explode function of php split a string with unicode?

record a very strange problem. I just made a script to get a piece of text and want to divide it into different fields. However, the text obtained by the program can never be split using explode (") (", $text) , but it can be split if $text is assigned to the text directly and then run!

finally, regular segmentation is used to succeed:

preg_split("/\)\s+\(/iu", $text);

but I don"t understand why explode doesn"t work, and splitting characters doesn"t use unicode characters.

Php
Jul.16,2021

you still think you should check the code.

Menu