3v4l.org

run code in 300+ PHP versions simultaneously
<?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); echo mb_convert_case(mb_strtolower($str), MB_CASE_TITLE, "UTF-8"); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Function utf8_encode() is deprecated in /in/7BdXV on line 8 Grande ÁRvoreGrande Árvore

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.91 ms | 401 KiB | 8 Q