The real power of PHP comes from its functions. PHP has more than 1000 built-in functions, and besides those, you can create your own custom functions to perform specific tasks.
A user-defined function declaration starts with the word function. A function name must start with a letter or an underscore.
Information can be passed to functions through arguments. An argument is just like a variable. You can add as many arguments as you want, just separate them with a comma.
If we call the function without an argument, it takes the default value as provided in the function definition.
To let a function return a value, use the return statement. This is useful when you want the function to calculate something and give the result back to the script.
In PHP 7 and later, you can specify the expected data type for arguments and the return value.