3v4l.org

run code in 300+ PHP versions simultaneously
<?php function strim($str) { $s1 = preg_replace('/[\pZ\pC]/muS',' ',$str); if(preg_last_error()) { $s1 = preg_replace('/[\pZ\pC]/muS',' ', iconv("UTF-8", "UTF-8//IGNORE", $str)); if(preg_last_error()) { return trim(str_replace(array(' ',' ',' ',' ',' '), ' ', $str)); } } return trim(preg_replace('/ {2,}/muS', ' ', $s1)); } echo "=".strim(" b áóñÑ baba bab")."=";
Output for git.master_jit, git.master, rfc.property-hooks
=b áóñÑ baba bab=

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:
34.59 ms | 401 KiB | 8 Q