PHP Functions

Example 1: User-defined

The function calculateArea() was made for this specifically

Length: 8

Width: 5

Area: 40

Example 2: Built in

The built in function of strtoupper() changes lowercase to uppercase

Original: derek albright

Using function: DEREK ALBRIGHT



Functions are blocks of code made to perform a specific task. PHP has many built in functions that can be used without having to create them. If you need to make your own, it's possible as long as you follow the specific parameters.