Bird
0
0

Which PHP function returns the last access time of a file?

easy📝 Conceptual Q1 of 15
PHP - File Handling
Which PHP function returns the last access time of a file?
Afilemtime()
Bfileatime()
Cfilesize()
Dfilectime()
Step-by-Step Solution
Solution:
  1. Step 1: Understand file time functions

    PHP has different functions for file times: fileatime() for last access, filemtime() for last modification, and filectime() for last change.
  2. Step 2: Identify the function for last access time

    fileatime() specifically returns the last time the file was accessed.
  3. Final Answer:

    fileatime() -> Option B
  4. Quick Check:

    Last access time function = fileatime() [OK]
Quick Trick: fileatime() gives last access time of a file [OK]
Common Mistakes:
  • Confusing filemtime() with fileatime()
  • Using filesize() for time info
  • Mixing filectime() meaning

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes