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 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.27, 8.3.29 - 8.3.30, 8.4.1 - 8.4.17, 8.5.0 - 8.5.2
- ماء - مايع - شيره، عرق، عصاره، عصير - حل، محلول - ذوب - خوي - بزاق، آبدهان - مني - بحر، دريا، يم - زهاب، - آبرو، حيثيت، شرف، عزت - تري، تازگي،طراوت & - خاک و انسان
Output for 8.3.28
/bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28)
Process exited with code 1.

preferences:
162.72 ms | 407 KiB | 5 Q