Superglobals & Web interview questions

18 Superglobals & Web questions from the PHP bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Superglobals & Web question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers