Return Values
Retrieve results from functions in PHP.
1
Return Values
Welcome to the next lesson! In this lesson, you’ll learn about return values in PHP functions and how they allow you to pass the results of a function back to the calling code. Let’s dive in!

2
What Are Return Values?
A return value is the result of a function’s execution. Instead of outputting data directly, a function can return it to be used elsewhere in the program.
Example: A function that calculates the area of a rectangle can return the result to the caller.