how to get date of yesterday using php

how to get date of yesterday using php

 

<?php
$test=date('d.m.Y',strtotime("-1 days"));

echo $test;

?>

or
<?php
$test=date('d-m-Y',strtotime("-1 days"));

echo $test;

?>

or
<?php
$test=date('y-m-d',strtotime("-1 days"));

echo $test;

?>
For any query or issue, feel free to discuss on http://discuss.eduguru.in