PHP MCQ Questions and Answers

Take Exam

PHP MCQ Questions with Answers help candidates strengthen their programming fundamentals and web development logic through objective-style practice. These PHP programming questions and answers are essential for cracking technical interviews and online coding assessments conducted by top recruiters like TCS, Infosys, Cognizant, and Wipro. Each question tests key PHP concepts such as syntax, data types, arrays, functions, form handling, and error management. Practicing these programming MCQs not only enhances problem-solving speed but also builds confidence for real-time technical evaluations. Whether you are preparing for placement drives, semester exams, or web development roles, this PHP MCQ collection with explanations and solutions PDF will help you master PHP efficiently. Begin your programming test practice online now and ace your upcoming PHP interview round.

PHP MCQ

Showing 10 of 130 questions

1. Trace the odd data type

  • floats
  • integer
  • doubles
  • Real number
Show Answer Report

2. Which of the folowing are valid float values?

  • 4.5678
  • 4.0
  • 7e4
  • All of above
Show Answer Report

3. In php string data are

  • delimited by single quote
  • delimited by double quote
  • delimited by <<< identifier
  • All of above
Show Answer Report

4. Which of the following delimiting method is known as string Interpolation

  • delimited by single quote
  • delimited by double quote
  • delimited by <<< identifier
  • All of above
Show Answer Report

5. Which datatypes are treaded as arrays

  • Integer
  • Float
  • String
  • Booleans
Show Answer Report

6. Which of following are compound data type?

  • Array
  • Objects
  • Both
  • None
Show Answer Report

7. Casting operator introduced in PHP 6 is

  • (array)
  • (int64)
  • (real) or (double) or (float)
  • (object)
Show Answer Report

8. When defining identifier in PHP you should remember that

  • Identifier are case sensitive. So $result is different than $ result
  • Identifiers can be any length
  • Both of above
  • None of above
Show Answer Report

9. Identify the invalid identifier

  • my-function
  • size
  • –some word
  • This&that
Show Answer Report

10. &nbsp;Which of folowiing variable assignment is 'by value' assignment in PHP

  • $value1= $value?
  • $value1= & $value?
  • $value1= & $value?
  • None
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test