Functions are reusable sections of code that perform a specific task. PHP contains built-in functions such as strlen(), which counts the characters in a string. Programmers can also create their own functions. A user-defined function can accept information as parameters, perform instructions, and return a result when the function is called.