A creature with 0 toughness is subject to state-based actions (CR 704.5f): any creature with toughness 0 or less is put into the graveyard as a state-based action. State-based actions are checked continuously and are performed before players receive priority, including before the combat damage step begins in a meaningful way.
When it is time to assign combat damage (CR 509.1), the attacking player must assign damage to each creature blocking it. However, trample (CR 702.19b) only requires that lethal damage be assigned to each blocking creature before excess can be assigned to the defending player. If the blocker is already in the graveyard due to 0 toughness, there is simply no blocker left to assign damage to, and all damage is assigned directly to the defending player.
Even if somehow a 0-toughness blocker were still considered 'present,' lethal damage for a creature with 0 toughness is 0 points (CR 702.19b, CR 704.5f), meaning the trample attacker's entire damage is 'excess' and goes to the player anyway.
Example: You attack with a 5/5 trampler. Your opponent blocks with a 1/1 that has been given -1/-1, reducing it to 0/0. Before damage is assigned, the 0/0 is put into the graveyard via state-based actions. Your 5/5 now has no blocker and assigns all 5 damage to the defending player.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.