Which of the following are true about functions in PHP?

  • Functions cannot have parameters.
  • Functions can only be used once in a PHP script.
  • Functions can be called recursively.
  • Functions can only be defined in a separate file.
In PHP, functions can have parameters, allowing them to accept input values. Functions can be used multiple times within a PHP script. Recursive functions are those that call themselves within their own definition. Functions can be defined directly in a PHP script or in separate files and included as needed. Learn more: https://www.php.net/manual/en/functions.user-defined.php
Add your answer
Loading...

Leave a comment

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