<?php
$next = min(strtotime('next tuesday'), strtotime('next friday'));
$timer = $next - time();
$minute = 60;
$hour = $minute * 60;
$day = $hour * 24;
$days = floor($timer / $day);
$hours = floor(($timer % $day) / $hour);
$minutes = floor(($timer % $hour) / $minute);
$seconds = $timer % $minute;
var_dump($days, $hours, $minutes, $seconds);