Philadelphia, the defending World Series champion, went 7-0 at home in the playoffs last season and will host the opening game Wednesday against either Colorado or the Dodgers at a time to be determined.
Sanchez (4-8) kept Philadelphia's prolific offense quiet, allowing one run and five hits while striking out three and walking one.
Cole Hamels (10-11), last season's World Series MVP, allowed three runs and three hits while walking two and striking out two in three innings.
Chris Coghlan led off the game with a double and scored on a double by Hanley Ramirez. Ramirez scored on Jorge Cantu's sacrifice fly to right field to give Florida a 2-0 lead. The Marlins tacked on a run in the second on Coghlan's double that scored Ronny Paulino.
Ryan Howard hit his 45th home run in the second inning to pull Philadelphia within 3-1.
It remained that way until Dan Uggla hit an RBI double to left in the eighth to make it 4-1. Jayson Werth's two-run homer in the bottom of the inning pulled Philadelphia within 4-3.
Leo Nunez pitched a scoreless ninth for his 26th save in 33 chances.
Coghlan has 110 hits since the All-Star break, tying him with Joe DiMaggio and Dick Allen for fifth best in National League history.
Ramirez, who leads the NL in batting, left after playing the field in the third inning with a right knee contusion, and Cantu departed in the sixth after spraining his right ankle trying to avoid getting picked off at second base.
Notes: The Phillies recalled left-hander Antonio Bastardo to the roster before the game. Bastardo, who pitched one scoreless inning Saturday, made five prior appearances with Philadelphia this season. ... Philadelphia's Chase Utley went 0-for-2 and is hitless in his last 15 at-bats. ... Florida has won seven of the eight games against the Phillies in Philadelphia this season.