PHP Function Examples

Built-in Function Example:

Current time in Cancun:
2026-11-16 20:14:17

User-Defined Function Example:
Diego, was born in 2004!
Gretel, was born in 2014!
Kevin, was born in 2000!


Explanation
There are many kinds of functions, but built-in functions are ones that are already set and understood by PHP, while user-built functions are ones that the user creates. A function is basically a block of statements that can be used repeatedly in a program.