Understanding functions

Example of a Built-in Function: strlen()

The length of the string 'how many letters are in this string' is: 35 characters.

Example of a User-defined Function: calculateArea()

The area of a rectangle with length 5 and width 10 is: 50 square units.

Explanation

php functions are resuable blocks of code that can be used to perform tasks. A built in function is predefined by php. User defined functions on the other hand are created by developers to often time cater to even more specific needs.