PHP MCQ Questions and Answers
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
51. Which of following function return 1 when output is successful?
- echo ( )
- print ( )
- both
- None
52. Which of followng statement is more suitable if you want to output a blend of static text and dynamic information stored within one or several variables?
- echo ( )
- print ( )
- Print f ( )
- None of above
53. Which of the following type specifier is invalid in print f ( ) functions
- % a
- % b
- % c
- % d
54. Which of the following function can assign the output to a string variable
- echo ( )
- print ( )
- print f ( )
- s print f ( )
55. Which of the following data type is not seal or datetype supported by PHP
- Array
- String
- Float
- Boolean
56. Which of the following data type is compound datatype supported by PHP
- Array
- String
- Float
- Boolean
57. If a boolean variable $ alive= 5;
- $ alive is false
- $ alive is true
- $ alive is overflow
- the statement is snot valid
58. For integer data type PHP 6 introduced
- 8 bit integer value
- 16 bit integer value
- 32 bit integer value
- 64 bit integer value
59. For integer data type PHP 5 and earlier supported
- 8 bit integer value
- 16 bit integer value
- 32 bit integer value
- 64 bit integer value
60. Which of the following is not a session function?
- sssion_decode
- session_destroy
- session_id
- session_pw