Superglobals & Web interview questions

18 real Superglobals & Web questions from the PHP bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Superglobal?

Junior
  1. A.an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  2. B.the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
  3. C.a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
  4. D.a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration
Reveal the answer + AI explanation — free account

2. Which term means: "a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration"?

Junior
  1. A.Session
  2. B.PDO
  3. C.Cross-site scripting
  4. D.Superglobal
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Superglobal — the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
  2. B.Superglobal — an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  3. C.Superglobal — a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
  4. D.Superglobal — a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration
Reveal the answer + AI explanation — free account

4. What is Session?

Junior
  1. A.the function that creates a secure salted one-way digest of a plaintext credential using a strong adaptive algorithm such as bcrypt by default
  2. B.the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
  3. C.an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  4. D.a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
Reveal the answer + AI explanation — free account

5. Which term means: "a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie"?

Junior
  1. A.Session
  2. B.PDO
  3. C.Superglobal
  4. D.Cross-site scripting
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.Session — an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  2. B.Session — a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
  3. C.Session — a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
  4. D.Session — a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration
Reveal the answer + AI explanation — free account

7. What is Prepared statement?

Mid
  1. A.an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  2. B.a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
  3. C.the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
  4. D.a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
Reveal the answer + AI explanation — free account

8. Which term means: "a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure"?

Mid
  1. A.PDO
  2. B.Session
  3. C.Superglobal
  4. D.Prepared statement
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.Prepared statement — a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
  2. B.Prepared statement — a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
  3. C.Prepared statement — an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  4. D.Prepared statement — a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration
Reveal the answer + AI explanation — free account

10. What is PDO?

Mid
  1. A.a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
  2. B.an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  3. C.the function that creates a secure salted one-way digest of a plaintext credential using a strong adaptive algorithm such as bcrypt by default
  4. D.the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
Reveal the answer + AI explanation — free account

11. Which term means: "the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL"?

Mid
  1. A.Cross-site scripting
  2. B.PDO
  3. C.Session
  4. D.Superglobal
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.PDO — an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  2. B.PDO — a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
  3. C.PDO — the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
  4. D.PDO — a server-side mechanism that persists user data across multiple requests by linking them through an identifier carried in a cookie
Reveal the answer + AI explanation — free account

13. What is password_hash?

Mid
  1. A.the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
  2. B.the function that creates a secure salted one-way digest of a plaintext credential using a strong adaptive algorithm such as bcrypt by default
  3. C.an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  4. D.a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
Reveal the answer + AI explanation — free account

14. Which term means: "the function that creates a secure salted one-way digest of a plaintext credential using a strong adaptive algorithm such as bcrypt by default"?

Mid
  1. A.Prepared statement
  2. B.PDO
  3. C.Superglobal
  4. D.password_hash
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.password_hash — the function that creates a secure salted one-way digest of a plaintext credential using a strong adaptive algorithm such as bcrypt by default
  2. B.password_hash — a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration
  3. C.password_hash — the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
  4. D.password_hash — a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
Reveal the answer + AI explanation — free account

16. What is Cross-site scripting?

Senior
  1. A.an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  2. B.a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration
  3. C.the function that creates a secure salted one-way digest of a plaintext credential using a strong adaptive algorithm such as bcrypt by default
  4. D.a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
Reveal the answer + AI explanation — free account

17. Which term means: "an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars"?

Senior
  1. A.Cross-site scripting
  2. B.Session
  3. C.Superglobal
  4. D.Prepared statement
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Senior
  1. A.Cross-site scripting — an injection flaw where unescaped attacker input is rendered as active markup in a victim's browser, mitigated by output encoding with htmlspecialchars
  2. B.Cross-site scripting — a precompiled SQL template whose user values are sent separately as bound parameters, neutralising injection by keeping data out of the query structure
  3. C.Cross-site scripting — a built-in associative array such as the GET or POST array that is automatically available in every scope without an import or global declaration
  4. D.Cross-site scripting — the object-oriented database abstraction layer offering one consistent API with prepared statements across many drivers like MySQL and PostgreSQL
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Superglobals & Web free