3 Prototype: int fileatime ( string $filename );
4 Description: Returns the time the file was last accessed, or FALSE
5 in case of an error. The time is returned as a Unix timestamp.
7 Prototype: int filemtime ( string $filename );
8 Description: Returns the time the file was last modified, or FALSE
11 Prototype: int filectime ( string $filename );
12 Description: Returns the time the file was last changed, or FALSE
13 in case of an error. The time is returned as a Unix timestamp.
15 Prototype: bool touch ( string $filename [, int $time [, int $atime]] );
16 Description: Attempts to set the access and modification times of the file
17 named in the filename parameter to the value given in time.
21 Prototype: void stat_fn(string $filename);
22 Description: Prints access, modification and change times of a file
24 function stat_fn( $filename ) {
25 echo "\n-- File '$filename' --\n";
26 echo "-- File access time is => ";
27 echo fileatime($filename)."\n";
29 echo "-- File modification time is => ";
30 echo filemtime($filename)."\n";
32 echo "-- inode change time is => ";
33 echo filectime($filename)."\n";
39 echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
40 echo "\n*** testing file info ***";
46 echo "\n*** testing touch ***";
47 var_dump(touch(NULL));
48 var_dump(touch(false));
51 //php generates permission denied, we generate No such file or dir.