Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Uppercase the first character of each word in a string
ucwords(string $stringstring $separators " \t\r\n\f\v"): string
    private function capitalizeHeaderName(string $name): string

    
{

        
$name str_replace('-'' '$name);

        
$name ucwords($name);

        return 
str_replace(' ''-'$name);

    }

}