Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (if the date is 30th December 2021)?
135. What will be the output of the following PHP code (if the date is 30th December 2021)?
- 30th - Dec - 2021
- 30 (Thursday) - Dec - 2021
- 30 (Thu) - Dec - 2021
- 30 (l) - Dec - 2021
Answer: B) 30 (Thursday) - Dec - 2021
Explanation:
The output will be "30 (Thursday) - Dec - 2021". The meaning of the values used in the code,
- d – Displays the date
- l – Displays the weekday
- M – Display the month name in 3 characters
- Y – Displays the year in four digits