PHP Manual
Prev |  | Next

# stat

(PHP 3 <= 3.0.18, PHP 4 >= 4.0.0)

stat -- Gives information about a file

## Description

``array stat` (string filename)`

Gathers the statistics of the file named by filename.

Returns an array with the statistics of the file with the following elements:

1. device

2. inode

3. inode protection mode

4. number of links

5. user id of owner

6. group id owner

7. device type if inode device *

8. size in bytes

9. time of last access

10. time of last modification

11. time of last change

12. blocksize for filesystem I/O *

13. number of blocks allocated

* - only valid on systems supporting the st_blksize type--other systems (i.e. Windows) return -1.

Returns `FALSE` in case of error.

stat() doesn't handle URL as does fopen().

The results of this function are cached. See clearstatcache() for more details.

Prev | Home | Next
rmdir | Up | lstat