3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php 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); } return $text; } $text = "Prueba de parseStop worlds para probar la prueba"; var_dump(parseStopWords($texto);
Output for 5.3.0 - 5.4.12
Parse error: syntax error, unexpected ';' in /in/g0MGQ on line 15
Process exited with code 255.