3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str="This is a test - That game is awesome (Cristiano Ronaldo is a great Soccer Player)"; //first explode it $e=explode(' ',$str); //loop to remove short words and special characters $out=array(); foreach ($e as $a){ $a=preg_replace("/[^A-Za-z0-9 ]/", '', $a); if(strlen($a)>2){ $out[]=$a; } } print_r($out);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => This [1] => test [2] => That [3] => game [4] => awesome [5] => Cristiano [6] => Ronaldo [7] => great [8] => Soccer [9] => Player )

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