- Home
- PDF downloads
- Computer Science MCQs PDF
- PHP MCQs PDF
PHP MCQs PDF Download
Download 91 PHP MCQs from Computer Science as a free PDF, with answers. Every question is also available online with an explanation, so you can practise, check your answers and revise the parts you get wrong. Last updated 20 November 2026.
Download PHP MCQs PDF
Your PDF is downloading
Help a friend prepare too: share this free PHP PDF.
Preview: first 10 PHP MCQs
1. How many error levels are available in PHP 5?
- A. 14
- B. 15
- C. 16
- D. 17
2. What is the description of Error level E_ERROR?
- A. Fatal run-time error
- B. Near-fatal error
- C. Compile-time error
- D. Fatal Compile-time error
3. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed?
- A. $date = Date(“22 JUNE 2013″)
- B. $date = new Date(“JUNE 22 2013″)
- C. $date = DateTime(“22 JUNE 2013″)
- D. $date = new DateTime(“22 JUNE 2013″)
4. Which character do the error_reporting directive use to represent the logical operator NOT in PHP?
- A. /
- B. !
- C. ~
- D. ^
5. Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?
- A. error_reporting = E_ALL
- B. error_reporting = E_ERROR | E_PARSE | E_CORE_ERROR
- C. error_reporting = E_ERROR | E_COMPILE_WARNING | E_CORE_ERROR
- D. error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR
Show answer
Correct answer: D – error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR
See the explanation6. Which version introduced the function error_get_last()?
- A. PHP 4
- B. PHP 5
- C. HP 5.2
- D. PHP 5.3
7. Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?
- A. ignore_repeated_errors
- B. ignore_repeat_error
- C. repeatedly_ignore_error
- D. repeated_error_ignore
8. Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?
- A. define_variable()
- B. define_log_variable()
- C. log_variable()
- D. define_syslog_variable()
9. Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?
- A. LOG_CONS
- B. LOG_NDELAY
- C. LOG_ODELAY
- D. LOG_PERROR
10. Which function is responsible for sending a custom message to the system log?
- A. systemlog()
- B. syslog()
- C. log_system()
- D. sys_log()
More Computer Science topics
- C Programming MCQs PDF 146
- C++ and Object-Oriented Programming MCQs PDF 115
- Cloud Computing MCQs PDF 85
- HTML MCQs PDF 75
- Django MCQs PDF 57
- Algorithms and Data Structures MCQs PDF 54
- Software Engineering MCQs PDF 52
- MySQL MCQs PDF 48
- Bootstrap MCQs PDF 36
- Jquery MCQs PDF 29
- Operating Systems MCQs PDF 23
- Javascript MCQs PDF 20
- Computer Networks MCQs PDF 18
- Cybersecurity MCQs PDF 17
Full subject & exam PDFs
- Computer Science MCQs PDF 992
- NTS Computer Science MCQs PDF 455
- PPSC IT Computer Science MCQs PDF 346
- Campus Interviews Computer Science MCQs PDF 346
- GATE CS Computer Science MCQs PDF 102
- UGC NET CS Computer Science MCQs PDF 75
- PPSC Computer Science MCQs PDF 44
- Technical Interviews Computer Science MCQs PDF 44
PHP MCQs PDF – FAQ
Is the PHP MCQs PDF free?
Yes. The PHP MCQs PDF is completely free. You do not need an account; just choose how many questions you want and press Download PDF.
How many questions are in the PHP MCQs PDF?
There are 91 PHP MCQs with answers. PDFs are made topic by topic: pick a topic and download 25, 50, 75, 100, 200, 300 or up to 500 questions in one file.
Does the PDF include the answers?
Yes. Choose "Answer key at the end" for a self-test sheet, or "Answer under each question" for quick revision. The online version also explains each answer.
Can I practise PHP MCQs online?
Yes. Press Practice online to answer the same questions on MCQsExam, see explanations, and take a timed test with a free certificate.
Is the PHP PDF updated?
The PDF is rebuilt automatically whenever new PHP MCQs are added or corrected. It was last updated on 20 November 2026.