Based on the ucfirst function, but instead of converting only the first letter of the first word, such as to do, using PHP, so that the first letter of all words in a string is converted to uppercase?
In this way, following the "full name" example,
'joão silva' => 'João Silva'
'maria Silva' => 'Maria Silva'
'gustavo da silva' => 'Gustavo Da Silva'
'GUILHERME DE CAMPOS' => 'Guilherme De Campos'