PHP Programming
Test your knowledge of PHP programming concepts including object-oriented programming, built-in functions, design patterns, security, and session management.
Questions
Which of the following constants represents that the file was uploaded successfully and no error occurred?
- UPLOAD_ERR_NO_FILE
- UPLOAD_ERR_FORM_SIZE
- UPLOAD_ERR_OK
- list()
- Assignment operator
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?
- UPLOAD_ERR_INI_SIZE
- UPLOAD_ERR_FROM_SIZE
- UPLOAD_ERR_NO_FILE
- $_SERVER[]
- Assignment operator
Which of the following methods makes it easier to shift classes inside the class hierarchies?
- setCookies()
- array
- unset()
- _construct()
- _destructor()
Which of the following keywords allows you to mark methods so that an inheriting class cannot overload them?
- Public
- Private
- NULL
- Static
- Final
Which of the following represents an array that includes all the GET variables that PHP received from the client browser?
- Array
- GET
- $_GET[]
- $_ENV[]
- $_SERVER[]
PHP, which enables you to create variables as aliases for other variables, are achieved by
- relational operator
- by reference assignment operator
- assignment operator
- concatenation operator
- NULL
Which of the following methods determines whether a certain variable has been already declared by PHP?
- _destructor()
- Set accessor
- setCookies()
- isset()
- unset()
You can iterate instances of the class by using which of the following language constructs?
- Assignment operator
- foreach()
- _destructor()
- unset()
- list()
Which of the following classes prevents it from being instantiated?
- NULL
- Final class
- Abstract class
- Meta class
- RemoteStackFrame class
PHP provides a C like way to force a type conversion of a value by using ___________________________.
- cast operator
- assignment operator
- concatenation operator
- relational operator
- array
Which of the following patterns is used when your programmer's algorithm is interchangeable with different variations of the algorithm?
- HMAC verification
- Strategy pattern
- Singleton pattern
- Factory pattern
- Reflection
Which of the following classes receives some input and according to that input, it decides what class instance is to be created?
- Factory class
- Meta class
- Final class
- _destructor()
- RemoteStackVariable class
Which of the following allows an application to store information for the current session?
- Static member
- PHP session
- HMAC verification
- Session memory
- EnableSession
Which of the following methods is a method in which an attacker inserts malicious code into queries that run on your database?
- SQL injection
- Input validation
- HMAC verification
- SetCookies()
- New MySQLi
Which of following programming languages supports dereferencing objects that are returned from methods?
- HTML
- C++
- C
- Java applet
- PHP5