Original string: hello world
Uppercase string: HELLO WORLD
Hello, Clifton!
In PHP, functions are blocks of reusable code that perform a specific task. Example:
strtoupper()
, Converts a string to uppercase.function
keyword, followed by the function name and parameters. In the function, supply the code to be executed, and you can return a value using the return
statement.