PHP superglobals are only accessible within functions.

  • FALSE
  • TRUE
The correct option is 2. PHP superglobals, such as $_POST, $_GET, and $_SERVER, are accessible from any part of the script, including both within and outside functions. Superglobals are automatically available in all scopes and can be accessed from anywhere within your PHP script without the need for special considerations or modifications. They provide important information and resources that are needed across different parts of the script, making them globally accessible. It is important to note that superglobals can be accessed from both functions and other parts of the script. Learn more: https://www.php.net/manual/en/language.variables.superglobals.php
Add your answer
Loading...

Leave a comment

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