1. Home
  2. Computer Science MCQs
  3. PHP
  4. The date() function returns ___ representation of the…

Added 23 Jan 2024

The date() function returns ___ representation of the current date and/or time.

  1. Integer
  2. String Correct answer
  3. Boolean
  4. Float

Correct answer

B. String

12 views

MCQSEXAM

Explanation

The date() function returns a string — the current date and/or time formatted according to the format characters you pass, for example date("Y-m-d") gives something like "2026-11-11".

If you need a number instead, time() returns the Unix timestamp as an integer.

Keep preparing with more Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs