3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = ' one! two: three; '; print_r(array('', str_word_count($str, 1)));
based on ZsrNF
Output for 4.3.0 - 7.1.0
Array ( [0] => [1] => Array ( [0] => one [1] => two [2] => three ) )