Functions in PHP

Built-in Function Example

The text is: INFOST 440

strlen() says the length is: 10

User-Defined Function Example

Hello, Sapar! Welcome to Activity 3.

Explanation (30+ words)

Functions are reusable blocks of code that run when you call them. Built-in functions come with PHP and perform common tasks like counting characters or formatting text. User-defined functions are created by the programmer to organize code, avoid repeating logic, and make programs easier to read and maintain.