I am trying to determine the difference between the date of a file in a directory and the current date, I have tried calculating two ways:
$fileUnixTimeDate = filemtime($file);
$fileFormattedDate = date('m/d/y',filemtime($file));
$todayUnixTimeDate = time();
$todayFormattedDate = date('m/d/y',time());
$unixDifference = $todayUnixTimeDate - $fileUnixTimeDate;
$formattedDifference = $todayFormattedDate - $fileFormattedDate;
This is the result for two files in the directory:

I can only assume that you’re trying to get the number of days’ difference:
Note: 86400 because there are 86400 seconds in 1 day.
$daysDifferencewould contain the amount of days.