User-defined functions are functions created by the programmer. They’re defined using the function keyword. The functions are different from built in function, and reusable.
// user defined function function sum() { $num1=10; $num2=20; echo $num1+$num2; } sum(); // call the function