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)?

  1. 30th - Dec - 2021
  2. 30 (Thursday) - Dec - 2021
  3. 30 (Thu) - Dec - 2021
  4. 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

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.