3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "1 ماء 2مايع 3 شيره، عرق، عصاره، عصير 4 حل، محلول 5 ذوب 6 خوي 7 بزاق، آبدهان 8 مني 9 بحر، دريا، يم 10 زهاب، 11 آبرو، حيثيت، شرف، عزت 21 تري، تازگي،طراوت & 1 خاک و انسان"; $dashed_line = preg_replace("/[0-9]+/", "- ", $str); $lines = preg_replace("/(?<!^)- /", "\n- ", $dashed_line); $lines_with_and = preg_replace("/&/", "\n&\n", $lines); $lines_with_and_single_space = preg_replace("/ +/", " ", $lines_with_and); echo preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $lines_with_and_single_space);
Output for git.master, git.master_jit, rfc.property-hooks
- ماء - مايع - شيره، عرق، عصاره، عصير - حل، محلول - ذوب - خوي - بزاق، آبدهان - مني - بحر، دريا، يم - زهاب، - آبرو، حيثيت، شرف، عزت - تري، تازگي،طراوت & - خاک و انسان

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:
36.74 ms | 406 KiB | 5 Q