3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = "A very nice únÌcÕdë text. Something nice to think Something about if you're into Unicode."; $words = str_word_count($text, 1); // use this function if you only want ASCII $frequency = array_count_values($words); arsort($frequency); $myJSON = json_encode($frequency); print_r($myJSON);
Output for hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
{"nice":2,"Something":2,"A":1,"very":1,"n":1,"c":1,"d":1,"text":1,"to":1,"think":1,"about":1,"if":1,"you're":1,"into":1,"Unicode":1}
Output for 5.6.0 - 5.6.30
{"nice":2,"Something":2,"if":1,"about":1,"you're":1,"into":1,"Unicode":1,"think":1,"to":1,"c":1,"n":1,"d":1,"text":1,"A":1,"very":1}