Miami(30-54) skipped out to a 1-0 lead in the top of the first. Josh Bell doubled down the left-field line for Bryan De La Cruz to score.
Philadelphia(55-29) took a 2-1 lead in the bottom of the first. Alec Bohm walloped a two-run homer to center field on the first pitch with Trea Turner aboard. It was the 10th home run for Bohm this season.
It became a 2-2 tie game during the third inning. De La Cruz ripped a solo home run to right field on a 2-2 count for his 15th homer of the year.
In the fourth inning, the Marlins regained the lead 4-2 with two runs. Emmanuel Rivera doubled off the right-field wall and Dane Myers crossed the plate. Two batters later, Jazz Chisholm Jr. drove in Rivera on a base hit up the middle.
The Fish increased it to 6-2 in the top of the fifth. Myers knocked in Bell with a double to left-center field. Two batters later, Emmanuel singled to left field and Myers reached home.
The Phils made it a three-run margin in the bottom of the frame. Nick Castellanos powered a double to deep left and Brandon Marsh scored.
The Phillies cut the deficit to 6-5 on two runs during the sixth inning. Castellanos picked up a base hit through the left side for Rafael Marchan and Bryson Stott to score.
Philadelphia leaped over the Marlins in the bottom of the seventh 7-6 with two runs. Turner singled up the middle which scored Whit Merrifield and David Dahl.