PHP functions must always return a value.
- TRUE
- FALSE
No, PHP functions do not have to always return a value. They can be defined without a return statement or simply perform an action without returning a value. However, if a function is intended to return a value, it can do so using the return statement. Whether or not a function should return a value depends on the specific task it needs to perform. Learn more: https://www.php.net/manual/en/functions.returning-values.php
Loading...
Related Quiz
- Which of the following are differences between variables and constants in PHP?
- Once a constant is set in PHP, it cannot be ______ or ______.
- A common practice in PHP forms is to validate user inputs such as email and URL to prevent ______.
- You are writing a PHP script and you need to define a class. How would you do this?
- The PHP $_SERVER superglobal contains information about headers, paths, and script locations.