PHP Programming

Test your knowledge of PHP programming concepts including object-oriented programming, built-in functions, design patterns, security, and session management.

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following constants represents that the file was uploaded successfully and no error occurred?

  1. UPLOAD_ERR_NO_FILE
  2. UPLOAD_ERR_FORM_SIZE
  3. UPLOAD_ERR_OK
  4. list()
  5. Assignment operator
Question 2 Multiple Choice (Single Answer)

Which of the following constants represents that the size of the uploaded files exceeded the value of the UPLOAD_MAX_FILE setting from PHP.ini?

  1. UPLOAD_ERR_INI_SIZE
  2. UPLOAD_ERR_FROM_SIZE
  3. UPLOAD_ERR_NO_FILE
  4. $_SERVER[]
  5. Assignment operator
Question 3 Multiple Choice (Single Answer)

Which of the following methods makes it easier to shift classes inside the class hierarchies?

  1. setCookies()
  2. array
  3. unset()
  4. _construct()
  5. _destructor()
Question 4 Multiple Choice (Single Answer)

Which of the following keywords allows you to mark methods so that an inheriting class cannot overload them?

  1. Public
  2. Private
  3. NULL
  4. Static
  5. Final
Question 5 Multiple Choice (Single Answer)

Which of the following represents an array that includes all the GET variables that PHP received from the client browser?

  1. Array
  2. GET
  3. $_GET[]
  4. $_ENV[]
  5. $_SERVER[]
Question 6 Multiple Choice (Single Answer)

PHP, which enables you to create variables as aliases for other variables, are achieved by

  1. relational operator
  2. by reference assignment operator
  3. assignment operator
  4. concatenation operator
  5. NULL
Question 7 Multiple Choice (Single Answer)

Which of the following methods determines whether a certain variable has been already declared by PHP?

  1. _destructor()
  2. Set accessor
  3. setCookies()
  4. isset()
  5. unset()
Question 8 Multiple Choice (Single Answer)

You can iterate instances of the class by using which of the following language constructs?

  1. Assignment operator
  2. foreach()
  3. _destructor()
  4. unset()
  5. list()
Question 9 Multiple Choice (Single Answer)

Which of the following classes prevents it from being instantiated?

  1. NULL
  2. Final class
  3. Abstract class
  4. Meta class
  5. RemoteStackFrame class
Question 10 Multiple Choice (Single Answer)

PHP provides a C like way to force a type conversion of a value by using ___________________________.

  1. cast operator
  2. assignment operator
  3. concatenation operator
  4. relational operator
  5. array
Question 11 Multiple Choice (Single Answer)

Which of the following patterns is used when your programmer's algorithm is interchangeable with different variations of the algorithm?

  1. HMAC verification
  2. Strategy pattern
  3. Singleton pattern
  4. Factory pattern
  5. Reflection
Question 12 Multiple Choice (Single Answer)

Which of the following classes receives some input and according to that input, it decides what class instance is to be created?

  1. Factory class
  2. Meta class
  3. Final class
  4. _destructor()
  5. RemoteStackVariable class
Question 13 Multiple Choice (Single Answer)

Which of the following allows an application to store information for the current session?

  1. Static member
  2. PHP session
  3. HMAC verification
  4. Session memory
  5. EnableSession
Question 14 Multiple Choice (Single Answer)

Which of the following methods is a method in which an attacker inserts malicious code into queries that run on your database?

  1. SQL injection
  2. Input validation
  3. HMAC verification
  4. SetCookies()
  5. New MySQLi
Question 15 Multiple Choice (Single Answer)

Which of following programming languages supports dereferencing objects that are returned from methods?

  1. HTML
  2. C++
  3. C
  4. Java applet
  5. PHP5