3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 替换字符串内的逗号、中文逗号、分号、顿号、空格等为英文逗号,会发生部分中文字符乱码 $str = "我发送到发顺丰,,阿斯蒂芬去玩了,,发生、的吴 青峰"; $newStr = preg_replace('/[,,;、\s]+/u', ',', $str); echo $newStr;
Output for git.master_jit, git.master
我发送到发顺丰,阿斯蒂芬去玩了,发生,的吴,青峰

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
25.89 ms | 405 KiB | 5 Q