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
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *