3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'GRANDE ÁRVORE'; function capitalize($string) { if (mb_detect_encoding($string) === 'UTF-8') { $string = mb_convert_case(utf8_encode($string), MB_CASE_TITLE, 'UTF-8'); } else { $string = mb_convert_case($string, MB_CASE_TITLE, 'UTF-8'); } return $string; } echo capitalize($str); ?>
Output for 4.3.0 - 7.1.0
Grande ÁRvore