Get PHP APC cache uptime in seconds

I just posted about getting Apache uptime. For what I’m seeking, I need to compare the system uptime, Apache’s uptime, and the uptime of the PHP APC opcode cache.

Here’s code for a PHP page that will simply output the number of seconds the APC cache has been up.


$limited = true;
$info = apc_cache_info('', $limited);
print_r(time() - $info['start_time']);