3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "Hello Friend"; $arr1 = str_word_count($str, 2); var_dump($arr1);
Output for 4.3.0 - 7.1.0
array(2) { [0]=> string(5) "Hello" [6]=> string(6) "Friend" }