3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.120.0140.03812.02
5.4.110.0110.04312.02
5.4.100.0120.04412.02
5.4.90.0120.04412.02
5.4.80.0120.04212.02
5.4.70.0130.04012.01
5.4.60.0120.04112.01
5.4.50.0120.04312.01
5.4.40.0120.04212.00
5.4.30.0180.05612.00
5.4.20.0090.04411.99
5.4.10.0200.05212.00
5.4.00.0130.04811.49
5.3.220.0160.05812.68
5.3.210.0110.04412.68
5.3.200.0130.04212.68
5.3.190.0150.04212.68
5.3.180.0110.04212.67
5.3.170.0140.04012.67
5.3.160.0180.06012.67
5.3.150.0150.05012.67
5.3.140.0130.04312.66
5.3.130.0140.04312.66
5.3.120.0210.05612.66
5.3.110.0140.04412.66
5.3.100.0230.05412.12
5.3.90.0120.04312.09
5.3.80.0130.04512.08
5.3.70.0200.06112.08
5.3.60.0160.06212.07
5.3.50.0130.04412.02
5.3.40.0100.04712.02
5.3.30.0120.04411.97
5.3.20.0140.04311.76
5.3.10.0130.04311.72
5.3.00.0110.04411.70

preferences:
130.87 ms | 1386 KiB | 7 Q