In PHP, if a function is supposed to return a value, the _______ statement is used.
- echo
- return
- output
The correct option is: "return." In PHP, the return statement is used within a function to specify the value that should be returned as the result of the function. The return statement can also be used to exit the function early if necessary. Learn more: https://www.php.net/manual/en/functions.returning-values.php
Loading...
Related Quiz
- Which of the following best describes PHP?
- You are writing a PHP script and you need to send an email. How would you do this using mail functions?
- PHP was originally created by ______ in the year ______.
- The main purpose of a destructor in a PHP class is to perform cleanup tasks before the object is destroyed.
- A PHP while loop will always execute its block of code ______.