3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = "ążźćńłśąęó"; foreach (count_chars($data, 1) as $i => $val) { echo "There were $val instance(s) of \"" , chr($i) , "\" in the string.\n"; }
Output for 4.3.0 - 7.1.0
There were 1 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 2 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 1 instance(s) of "�" in the string. There were 4 instance(s) of "�" in the string. There were 5 instance(s) of "�" in the string.