What is the purpose of the "return" statement in a PHP function?
- It outputs data to the browser.
- It ends the function's execution.
- It defines a variable.
- It declares a new function.
The "return" statement in a PHP function is used to end the function's execution and return a value or data to the calling code.
Loading...
Related Quiz
- Which of the following statements about variable scope in PHP are correct?
- What PHP function is used to return the highest value from a list of numbers?
- What is the significance of the E_ALL constant in PHP error reporting?
- The base class for all exceptions in PHP is ________.
- What is the difference between $a != $b and $a !== $b?