PHP Functions

Built-in Function Example

Original text: I am learning PHP

Uppercase text: I AM LEARNING PHP

User-Defined Function Example

Hello, Isaiah! Welcome to Activity 3.

Explanation

Functions are reusable blocks of code that perform a specific task. PHP includes built-in functions, such as strtoupper(), that are ready to use. Programmers can also create their own functions for tasks they need. Functions can accept information as parameters and can return a result that can be used elsewhere in the program.

Back to Activity 3