MCQOPTIONS
Saved Bookmarks
This section includes 280 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 will be the output of the following PHP code ? |
| A. | ello world |
| B. | ello world in italics |
| C. | othing |
| D. | rror |
| Answer» C. othing | |
| 2. |
What will be the output of the following PHP code ? |
| A. | Hello world |
| B. | ello world# Hello world |
| C. | ello world |
| D. | rror |
| Answer» B. ello world# Hello world | |
| 3. |
What will be the output of the following PHP code ? |
| A. | edredred |
| B. | edred |
| C. | ed |
| D. | rror |
| Answer» D. rror | |
| 4. |
What will be the output of the following PHP code ? |
| A. | 0.75 |
| B. | 0.05 |
| C. | 0.25 |
| D. | rror |
| Answer» D. rror | |
| 5. |
What will be the output of the following PHP code ? |
| A. | 0.75 |
| B. | 0.05 |
| C. | 0.25 |
| D. | rror |
| Answer» E. | |
| 6. |
What will be the output of the following PHP code ? |
| A. | 0.75 |
| B. | 0.875 |
| C. | 0.5 |
| D. | rror |
| Answer» C. 0.5 | |
| 7. |
What will be the output of the following PHP code ? |
| A. | 0.25 |
| B. | 0.25 |
| C. | 3.25 |
| D. | 4.25 |
| Answer» E. | |
| 8. |
What will be the output of the following PHP code ? |
| A. | 1 |
| B. | 4 |
| C. | 5 |
| D. | 1 |
| Answer» E. | |
| 9. |
What will be the output of the following PHP code ? |
| A. | ello World |
| B. | ye |
| C. | ello worldBye |
| D. | rror |
| Answer» B. ye | |
| 10. |
What will be the output of the following PHP code ? |
| A. | 010 |
| B. | 05 |
| C. | 10 |
| D. | rror |
| Answer» B. 05 | |
| 11. |
What will be the output of the following PHP code ? |
| A. | 37 |
| B. | 39 |
| C. | 49 |
| D. | 47 |
| Answer» B. 39 | |
| 12. |
What will be the output of the following PHP code ? |
| A. | 3 |
| B. | 43 |
| C. | 49 |
| D. | 39 |
| Answer» E. | |
| 13. |
What will be the output of the following PHP code ? |
| A. | edgreen |
| B. | ed green |
| C. | |
| Answer» D. | |
| 14. |
What will be the output of the following PHP code ? |
| A. | ed |
| B. | reen |
| C. | ed green |
| D. | edgreen |
| Answer» E. | |
| 15. |
What will be the output of the following PHP code ? |
| A. | ed green |
| B. | ed |
| C. | reen |
| D. | rror |
| Answer» E. | |
| 16. |
What will be the output of the following PHP code ? |
| A. | ed red |
| B. | ed |
| C. | rror |
| D. | othing |
| Answer» D. othing | |
| 17. |
What will be the output of the following PHP code ? |
| A. | ed |
| B. | color |
| C. | ed |
| D. | rror |
| Answer» C. ed | |
| 18. |
What will be the output of the following PHP code ? |
| A. | ello world |
| B. | cho “Hello world” |
| C. | cho Hello world |
| D. | rror |
| Answer» E. | |
| 19. |
What will be the output of the following PHP code ? |
| A. | hiswasabadidea |
| B. | hiswasbadidea |
| C. | hiswas a badidea |
| D. | hiswas abadidea |
| Answer» C. hiswas a badidea | |
| 20. |
What will be the output of the following PHP code ? |
| A. | his, was, a, bad, idea |
| B. | his was a bad idea |
| C. | hiswasabadidea |
| D. | rror |
| Answer» D. rror | |
| 21. |
What will be the output of the following PHP code ? |
| A. | his, was, a, bad, idea |
| B. | his was a bad idea |
| C. | hiswasabadidea |
| D. | rror |
| Answer» D. rror | |
| 22. |
What will be the output of the following PHP code ? |
| A. | y car is a Volvo |
| B. | y car is a BMW |
| C. | y car is a Toyota |
| D. | rror |
| Answer» B. y car is a BMW | |
| 23. |
What will be the output of the following PHP code ? |
| A. | his is India |
| B. | his is India |
| C. | his is |
| D. | rror |
| Answer» C. his is | |
| 24. |
What will be the output of the following PHP code ? |
| A. | elloWorld |
| B. | ello+World |
| C. | |
| Answer» D. | |
| 25. |
What will be the output of the following PHP code ? |
| A. | elloWorld |
| B. | one$two |
| C. | ello |
| D. | rror |
| Answer» B. one$two | |
| 26. |
What will be the output of the following PHP code ? |
| A. | netwo |
| B. | ne, two |
| C. | ne |
| D. | rror |
| Answer» E. | |
| 27. |
What will be the output of the following PHP code ? |
| A. | netwo |
| B. | ne |
| C. | othing |
| D. | rror |
| Answer» E. | |
| 28. |
What will be the output of the following PHP code ? |
| A. | olvo |
| B. | MW |
| C. | oyota |
| D. | rror |
| Answer» D. rror | |
| 29. |
What will be the output of the following PHP code ? |
| A. | 1 |
| B. | 1 |
| C. | 0 |
| D. | rror |
| Answer» C. 0 | |
| 30. |
What will be the output of the following PHP code ? |
| A. | GREETING |
| B. | o output |
| C. | HP is a scripting language |
| D. | REETING |
| Answer» C. HP is a scripting language | |
| 31. |
What will be the output of the following PHP code ? |
| A. | hiswasabadidea |
| B. | his was a bad idea |
| C. | othing |
| D. | rror |
| Answer» B. his was a bad idea | |
| 32. |
What will be the output of the following PHP code ? |
| A. | rue |
| B. | alse |
| C. | |
| Answer» D. | |
| 33. |
What will be the output of the following PHP code ? |
| A. | rue |
| B. | alse |
| C. | othing |
| D. | rror |
| Answer» D. rror | |
| 34. |
What will be the output of the following PHP code ? |
| A. | est |
| B. | esttest |
| C. | estvalue |
| D. | rror, constant value cannot be changed |
| Answer» D. rror, constant value cannot be changed | |
| 35. |
What will be the output of the following PHP code ? |
| A. | have a value |
| B. | have a valueI have a value |
| C. | RROR |
| D. | have a valueNEW_GOO_NAME_CONSTANTS |
| Answer» C. RROR | |
| 36. |
What will be the output of the following PHP code ? |
| A. | F:42 |
| B. | o output |
| C. | F: |
| D. | RROR |
| Answer» E. | |
| 37. |
What will be the output of the following PHP code ? |
| A. | .01.0 |
| B. | 1 |
| C. | o output |
| D. | RROR |
| Answer» E. | |
| 38. |
What will be the output of the following PHP code ? |
| A. | est |
| B. | rror |
| C. | yObject::CONSTANT |
| D. | o output |
| Answer» C. yObject::CONSTANT | |
| 39. |
What will be the output of the following PHP code ? |
| A. | winner$looser |
| B. | looser |
| C. | |
| Answer» D. | |
| 40. |
What will be the output of the following PHP code ? |
| A. | winner/$looser |
| B. | $looser |
| C. | |
| Answer» D. | |
| 41. |
What will be the output of the following PHP code ? |
| A. | 04 |
| B. | 10 |
| C. | 400 |
| D. | 100 |
| Answer» D. 100 | |
| 42. |
What will be the output of the following PHP code ? |
| A. | 6 |
| B. | 6 |
| C. | 5 |
| D. | 5 |
| Answer» B. 6 | |
| 43. |
What will be the output of the following PHP code ? |
| A. | we12345rty |
| B. | we{$a}rty |
| C. | rror |
| D. | o output |
| Answer» B. we{$a}rty | |
| 44. |
What will be the output of the following PHP code ? |
| A. | 797568 |
| B. | o output |
| C. | rror |
| D. | x6dc0 |
| Answer» B. o output | |
| 45. |
In PHP the integer 45 is stored exactly as 45. The floating point number 46.3 could be stored as. |
| A. | 6 |
| B. | 6.3 |
| C. | 6.2999999 |
| D. | one of above |
| Answer» D. one of above | |
| 46. |
PHP can automatically convert integers to floating point numbers and floating point numbers to integers. |
| A. | RUE |
| B. | ALSE |
| Answer» B. ALSE | |
| 47. |
What will be the output of the following PHP code ? |
| A. | we12345rty |
| B. | we$arty |
| C. | we |
| D. | rror |
| Answer» D. rror | |
| 48. |
What will be the output of the following PHP code ? |
| A. | we12345rty |
| B. | we{$a}rty |
| C. | rror |
| D. | o output |
| Answer» C. rror | |
| 49. |
What will be the output of the following PHP code ? |
| A. | we12345rty |
| B. | we$arty |
| C. | rror |
| D. | o output |
| Answer» B. we$arty | |
| 50. |
Numbers in PHP can’t be infinitely large or small, there is some minimum and maximum size. If more larger (or smaller) numbers are needed then . . . . . must be used:1. GPM libraries2. GMP libraries3. CBMath4. BCMath |
| A. | ption 2 and 4 |
| B. | ption 3 and 4 |
| C. | ption 1 and 4 |
| D. | ption 2 and 3 |
| Answer» B. ption 3 and 4 | |