Functions are pieces of code which you can reuse that perform specific tasks. PHP includes many built-in functions, such as strlen(), which counts the number of characters in a string. Programmers can also create their own functions for specific tasks. A user-defined function can accept information through parameters, perform an operation, and return a result when the function is called.