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.5.0 - 7.1.0
Notice: Undefined variable: texto in /in/H0IZs on line 15 string(0) ""
Output for 4.3.0 - 5.4.45
string(0) ""