3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cleanWord( &$word ){ $word = trim($word, "'\".!<>{}()-/\*&^%$#@+~ "); } // list of comments $arr_str = [ " this!! is the first &test message./", "*Second ^message this (is) ", "'another\ **message*** !\"}& it is. also the favorite one (message)." ]; // To join array's items $str = implode(" ", $arr_str); // To chop the string based on the space $words = explode(" ",$str); // To remove redundant character(s) array_walk($words, 'cleanWord'); // To remove empty array elements $words = array_filter($words); print_r($words);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [2] => this [3] => is [8] => the [9] => first [10] => test [11] => message [12] => Second [13] => message [14] => this [15] => is [17] => another [18] => message [20] => it [21] => is [22] => also [23] => the [24] => favorite [25] => one [26] => message )

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:
149.34 ms | 406 KiB | 5 Q