Built-in Function Example

The length of the word 'Activity' is 8

User-Defined Function Example

Hello, Gavin!

Explanation

Functions are reusable blocks of code that perform a specific task. Built-in functions are already created by PHP, such as strlen(), which calculates string length. User-defined functions are written by the programmer to perform custom operations. Functions improve organization and allow code reuse.