I would try something like:
$test_timestamp = todays timestamp;
for( $i=0; $i<7; $i++){
{
$test_timestamp = test_timestamp - 1 day
$test_day = date("D")
if( $test_day == "Sun" )
{ break; }
}
the idea is to have the loop test the name of each day, going backwards by one day for each iteration. if the day is == to Sun, then you've found it. after the loop, $test_timestamp will have the date that you want, so you can output it like:
echo date( "Y m d", $test_timestamp );