How can you create custom functions in PHP, and what are the benefits of doing so?

To create custom functions in PHP, you can use the `function` keyword followed by the function name and parameters inside parentheses. You can then define the functionality of the function within curly braces. Custom functions allow you to encapsulate reusable blocks of code, making your code more modular, easier to read, and maintain. They also help in reducing code duplication and promoting code reusability.

// Example of creating a custom function in PHP
function greetUser($name) {
    echo "Hello, $name!";
}

// Calling the custom function
greetUser("John");