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

Leave a comment

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