$startDate = new DateTime("2019-10-27");
$endDate = new DateTime("2020-04-11");
$difference = $endDate->diff($startDate);
echo $difference->format("%a");
date('Y/m/d',strtotime("-1 days"));
Or Use DateTime class like this-
$date = new DateTime();
echo $date->modify("-1 days")->format('Y-m-d');