
- PHP Tutorial
- PHP - Home
- PHP - Introduction
- PHP - Environment Setup
- PHP - Syntax Overview
- PHP - Variable Types
- PHP - Constants
- PHP - Operator Types
- PHP - Decision Making
- PHP - Loop Types
- PHP - Arrays
- PHP - Strings
- PHP - Web Concepts
- PHP - GET & POST
- PHP - File Inclusion
- PHP - Files & I/O
- PHP - Functions
- PHP - Cookies
- PHP - Sessions
- PHP - Sending Emails
- PHP - File Uploading
- PHP - Coding Standard
- Advanced PHP
- PHP - Predefined Variables
- PHP - Regular Expression
- PHP - Error Handling
- PHP - Bugs Debugging
- PHP - Date & Time
- PHP & MySQL
- PHP & AJAX
- PHP & XML
- PHP - Object Oriented
- PHP - For C Developers
- PHP - For PERL Developers
- PHP Form Examples
- PHP - Form Introduction
- PHP - Validation Example
- PHP - Complete Form
- PHP login Examples
- PHP - Login Example
- PHP - Facebook Login
- PHP - Paypal Integration
- PHP - MySQL Login
- PHP AJAX Examples
- PHP - AJAX Search
- PHP - AJAX XML Parser
- PHP - AJAX Auto Complete Search
- PHP - AJAX RSS Feed Example
- PHP XML Example
- PHP - XML Introduction
- PHP - Simple XML
- PHP - Simple XML GET
- PHP - SAX Parser Example
- PHP - DOM Parser Example
- PHP Frame Works
- PHP - Frame Works
- PHP - Core PHP vs Frame Works
- PHP Design Patterns
- PHP - Design Patterns
- PHP Function Reference
- PHP - Built-In Functions
- PHP Useful Resources
- PHP - Questions & Answers
- PHP - Useful Resources
- PHP - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
PHP Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to PHP. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Q 1 - Which of the following is correct about PHP?
A - PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
B - PHP is a server side scripting language that is embedded in HTML.
Answer : D
Explanation
All of the above options are correct.
Q 2 - Which of the following type of variables are whole numbers, without a decimal point, like 4195?
Answer : A
Explanation
Integers: are whole numbers, without a decimal point, like 4195.
Q 3 - Which of the following is correct about NULL?
A - A variable that has been assigned NULL evaluates to FALSE in a Boolean context.
B - A variable that has been assigned NULL returns FALSE when tested with IsSet() function.
Answer : C
Explanation
Both of the above options are correct.
Q 4 - Which of the following array represents an array containing one or more arrays?
Answer : C
Explanation
Multidimensional array − An array containing one or more arrays and values are accessed using multiple indices.
Q 5 - Which of the following function is used to redirect a page?
Answer : B
Explanation
The PHP header() function supplies raw HTTP headers to the browser and can be used to redirect it to another location. The redirection script should be at the very top of the page to prevent any other part of the page from loading.
Q 6 - Which of the following function opens a file?
Answer : A
Explanation
The PHP fopen() function is used to open a file. It requires two arguments stating first the file name and then mode in which to operate.
Q 7 - Which of the following is used to set cookies?
Answer : A
Explanation
PHP provided setcookie() function to set a cookie.
Q 8 - Which of the following is used to destroy the session?
Answer : D
Explanation
A PHP session can be destroyed by session_destroy() function.
Q 9 - Which of the following method of Exception class retrieve the error message when error occured?
Answer : A
Explanation
getMessage() method of Exception class returns the message of exception.
Q 10 - Which of the following method returns a formatted string representing a date?
Answer : C
Explanation
The date() function returns a formatted string representing a date. You can exercise an enormous amount of control over the format that date() returns with a string argument that you must pass to it.