$name = 'john'; echo ucfirst($name); // Output: JohnIn this example, we have a string 'john' which we pass as an argument to the ucfirst function. The function returns the capitalized string 'John'. ucfirst function is part of the PHP core library and does not require any external package or library.