

MCQOPTIONS
Saved Bookmarks
This section includes 20 Mcqs, each offering curated multiple-choice questions to sharpen your Php knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the value of $a and $b after the function call?
|
A. | n = 6 |
B. | n = 6 and m = 5 |
C. | m = 6 |
D. | Error |
E. | None of these |
Answer» C. m = 6 | |
2. |
What will be the output of the following PHP code?
|
A. | Error |
B. | Rahul |
C. | Ats Ajit Aju |
D. | Ats Ajit Rahul Aju |
E. | None of these |
Answer» D. Ats Ajit Rahul Aju | |
3. |
What will be the output of the following PHP code?
|
A. | 25 |
B. | 35 |
C. | Error |
D. | 60 |
E. | None of these |
Answer» E. None of these | |
4. |
What will be the output of the following PHP code?
|
A. | 10120 |
B. | Error |
C. | 101 |
D. | 120 |
E. | None of these |
Answer» B. Error | |
5. |
What will be the output of the following code?
|
A. | AjitAjit |
B. | My name is Ajit. My name is Ajit. |
C. | Ajit |
D. | Error |
E. | None of these |
Answer» C. Ajit | |
6. |
What will be the output of the following PHP code?
|
A. | Y |
B. | E |
C. | L |
D. | O |
E. | W |
Answer» E. W | |
7. |
What will be the output of the following PHP code?
|
A. | I love Chennai. I love Mumbai. |
B. | I love Mumbai. |
C. | Error |
D. | I love Chennai. I love Rajshatan. |
E. | None of these |
Answer» E. None of these | |
8. |
What will be the output of the following code?
|
A. | 000 |
B. | 010 |
C. | 110 |
D. | 123 |
E. | None of these |
Answer» E. None of these | |
9. |
What will be the output of the following PHP code?
|
A. | Error |
B. | What is her age? n She is 18 years old |
C. | What is her age? n She is $n years old. |
D. | 18 |
E. | None of these |
Answer» D. 18 | |
10. |
What will be the output of the following PHP code?
|
A. | Error |
B. | 1 |
C. | False |
D. | 6 === 6 |
E. | None of these |
Answer» C. False | |
11. |
What will be the output of the following PHP code?
|
A. | Interview |
B. | Error |
C. | Mania |
D. | InterviewMania |
E. | None of these |
Answer» E. None of these | |
12. |
What will be the output of the following php code?
|
A. | 10 |
B. | 12 |
C. | 10+12 |
D. | 12+10 |
E. | Error |
Answer» D. 12+10 | |
13. |
What will be the output of the following php code?
|
A. | 33 |
B. | Error |
C. | 12+21 |
D. | 12 |
E. | 21 |
Answer» B. Error | |
14. |
What does PHP stand for? |
A. | Hypertext Preprocessor |
B. | Pretext Hypertext Processor |
C. | Personal Home Page |
D. | Preprocessor Home Page |
E. | Both A and C |
Answer» F. | |
15. |
Which of the following php statement/statements will store 120 in variable n? |
A. | 120 = $n; |
B. | int $n= 120; |
C. | int n= 120; |
D. | $n= 120; |
E. | None of these |
Answer» E. None of these | |
16. |
Which of the following PHP statements will output Hello interview Mania on the screen? |
A. | sprintf ( Hello interview Mania ); |
B. | echo ( Hello interview Mania ); |
C. | print ( Hello interview Mania ); |
D. | printf ( Hello interview Mania ); |
E. | B, C and D |
Answer» F. | |
17. |
Which of the below statements is equivalent to $sum+= $sum ? |
A. | $sum= $sum+$sum |
B. | $sum= $sum |
C. | $sum= $sum+ $sum+ 1 |
D. | $sum= $sum+ 1 |
E. | None of these |
Answer» B. $sum= $sum | |
18. |
Which of following variables can be assigned a value to it? |
A. | $this |
B. | $3hello |
C. | $This |
D. | $_hello |
E. | Both C and D |
Answer» F. | |
19. |
If $n = 25 what will be returned when (($n == 25) ? 5 : 1) is executed? |
A. | 5 |
B. | 1 |
C. | 25 |
D. | Error |
E. | None of these |
Answer» D. Error | |
20. |
Which of the looping statements is/are supported by PHP? |
A. | for each loop |
B. | do-while loop |
C. | while loop |
D. | for loop |
E. | All of above |
Answer» F. | |