Hımmm evet haklısın, ufak bir mantık hatamız olmuş. Şöyle daha güzel o halde

<?= (6-date('w') >= 0) ? 6-date('w') : 6; ?>