Ver original<?phpsetlocale(LC_ALL, 'es_MX'); $string = 'versión';echo htmlentities(strtoupper(html_entity_decode($string)));
Ver originalfunction ucfirstHTMLentity($matches){ return "&".ucfirst(strtolower($matches[1])).";"; } function fullUpper($str){ $subject = strtoupper(htmlentities($str, null, 'UTF-8')); $pattern = '/&([A-Z]+);/'; return preg_replace_callback($pattern, "ucfirstHTMLentity", $subject); }