On my server running under Windows XP and PHP 5.4.16, it seems like the filemtime and fileatime returns value of creation time.
$r = touch("/$fname",10,10);
if ($r===false)
echo " FAILED ";
$stat = stat("/$fname");
print_r($stat);
$int = fileatime($fname);
$int2 = filemtime($fname);
echo "$int $int2";
The stat() return this array:
(
[0] => 15
[1] => 0
[2] => 33206
[3] => 1
[4] => 0
[5] => 0
[6] => 15
[7] => 0
[8] => 11
[9] => 11
[10] => 1570657454
[11] => -1
[12] => -1
[dev] => 15
[ino] => 0
[mode] => 33206
[nlink] => 1
[uid] => 0
[gid] => 0
[rdev] => 15
[size] => 0
[atime] => 11
[mtime] => 11
[ctime] => 1570657454
[blksize] => -1
[blocks] => -1
)
But echo prints creation time:
1570657955 1570657955
I know I could use the stat() instead, but why the function which should do the job do not work for me? And if it works for you, isn't the stat() slower than filemtime?