3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '"¡Á É Ñ Elaskar me mandaba flores pero yo creía que eran de Fariña 7!", dijo Dominique Pestaña'; function parseStopWords($text){ $text = preg_replace('/[^a-zA-Z0-9áéíóúñÁÉÍÓÚÑñ¡\', ]/i','',$text); $stopwords = array('a','ante','bajo','cabe','con','contra','de','desde','en','entre','hacia','hasta','para','por','sin','sobre','tras','el','lo','la','los','las','un','unos','una','al','del','que','es','se','y','fue'); foreach($stopwords as $w){ $text = preg_replace('/\b'.$w.'\b/i','',$text); } $text = preg_replace('/\s{2,}/i',' ',$text); return $text; } echo parseStopWords($text); die; echo preg_replace('/[\x{00ff}-\x{ffff}]/u', '*', $text); echo $text; $mystring = 'Título ú Nota ó !¡ ! áéíóúñ )()&*%#$DR GT^(%(%(*&_{|}{jjkg cde d"'; $find = array ( '#[^a-z0-99áéíóúñ\\s]#is', '#\\s#' ); $replace = array ( '', ' ' ); $mystring = preg_replace ( $find, $replace, $mystring ); echo $mystring;
Output for git.master, git.master_jit, rfc.property-hooks
¡Á É Ñ Elaskar me mandaba flores pero yo creí eran Fariñ 7, dijo Dominique Pestañ

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