Bird
0
0

What type of data does the PHP $_SERVER superglobal array hold?

easy📝 Conceptual Q11 of 15
PHP - Superglobals and Web Context
What type of data does the PHP $_SERVER superglobal array hold?
AUser input from forms
BInformation about headers, paths, and script locations
CDatabase connection details
DSession variables
Step-by-Step Solution
Solution:
  1. Step 1: Understand what $_SERVER contains

    $_SERVER holds server and execution environment information like headers and script paths.
  2. Step 2: Compare with other options

    User input is in $_POST or $_GET, database details are not stored here, and session variables are in $_SESSION.
  3. Final Answer:

    Information about headers, paths, and script locations -> Option B
  4. Quick Check:

    $_SERVER = server info [OK]
Quick Trick: Remember: $_SERVER = server and request info [OK]
Common Mistakes:
  • Confusing $_SERVER with $_POST or $_GET
  • Thinking $_SERVER holds user session data
  • Assuming $_SERVER contains database info

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes