PHP uses the global keyword to make a local variable have global scope.

  • TRUE
  • FALSE
The statement is false. In PHP, the global keyword is used to access and modify variables with global scope from within a function. It allows you to work with global variables within the local scope of a function. By using the global keyword followed by the variable name, you can indicate that the variable being used is the global variable and not a local one. However, it does not change the scope of the variable to global. Learn more: https://www.php.net/manual/en/language.variables.scope.php#language.variables.scope.global
Add your answer
Loading...

Leave a comment

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