I don't see any reason to force the component name in the code to start with a capital letter. $string = ucfirst($string);