3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "ˈdɪk ʃəˌnɛr i"; $chrArray = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY); for($i = 0 ; $i < count($chrArray) ; $i++) { if($chrArray[$i] == 'ˈ' || $chrArray[$i] == 'ˌ') $chrArray[$i] = '_'; } $output = join($chrArray, ""); echo $output;
Output for 5.0.0 - 7.2.0
_dɪk ʃə_nɛr i
Output for 4.3.0 - 4.4.9
ˈdɪk ʃəˌnɛr i