How to find out what the date was 5 days ago?

I think a readable way of doing that is:

$days_ago = date('Y-m-d', strtotime('-5 days', strtotime('2008-12-02')));

find out what the date was 5 days ago from today in php

$date = strtotime(date("Y-m-d", strtotime("-5 day")));

find out what the date was n days ago from today in php

$date = strtotime(date("Y-m-d", strtotime("-n day")));

5 days ago from a particular date:

$date = new DateTime('2008-12-02');
$date->sub(new DateInterval('P5D'));
echo $date->format('Y-m-d') . "\n";