For the month, the 22-year-old batted .242 with five homers and 10 RBIs. In May, he posted huge numbers -- 12 home runs, 30 RBIs and a .343 batting average.
How would Stanton assess his June?
"Like the team, up and down," he said. "Not how I should have been early. But we're on the way back up."
Mark Buehre (7-8) won the showdown with Hamels (10-4), who has lost three times to Miami this season.
"Finally, we're playing good in this month," Stanton said. "We've got to put this month in the past and take July on."
Miami heads into July having won three straight, and the club finished 8-18 in June.
Heath Bell closed out a scoreless ninth, retiring Shane Victorino on a tough grounder to short. Jose Reyes made a nice back-handed play and throw to first for the final out, stranding pinch-runner Mike Fontenot on second.
Flipping the calendar isn't as big as looking at the big picture, in Bell's eyes.
"The thing is, everybody talks about months," said Bell, who has 16 saves in 20 attempts. "I've never been on a club that talked about months so much. I talk about the year, and day in and day out. What did we do this week? What did we do this last series? What did we do last night? What did we do about today? Not the month."
Buehrle had another workmanlike outing, going at least seven innings for the eighth time in 16 starts. The left-hander struck out seven, and showed why he is so tough to steal against. Twice he caught the Phillies trying to swipe second. He got Hunter Pence in a rundown in the second inning, and in the fifth inning, he was able to step off and get Hamels.
Technically, they were ruled as caught-stealing attempts instead of pickoffs.
On a day runs were scarce, the Marlins took advantage of Stanton's prowess. In the first inning, he set the tone with a laser shot to left.
"I think right now he's not getting himself out," Marlins manager Ozzie Guillen said. "I think when he got in a slump in the middle of the month, he just tried chasing too many bad pitches.
"I think he was desperate because we weren't hitting and the people behind him struggled. He tried to carry them, carry the ballclub. I think right now he's learning. I think in a couple more years, this kid could be very big. No doubt about it. Right now he's just going through the process, seeing better pitches. Every time you swing at good pitches, you're going to do more damage."
Hamels had given up two home runs in his last four starts. With two outs in the first inning, the lefty was taken deep by Stanton, who blistered a drive that smacked off the wall above the Clevelander pool area in left field.
"He doesn't make many mistakes," Stanton said. "You have to take advantage when he does."
The home run, estimated at 424 feet, was Stanton's 18th of the season, matching his number before the All-Star break last year.
Philadelphia pulled even in the second inning. Carlos Ruiz doubled and scored on Victorino's sacrifice fly.
In the third inning, Stanton's two-out RBI single put Miami in front 2-1. Jose Reyes double and raced home on the single to center.
"We had trouble keeping Reyes off the bases, and Stanton of course hit the home run and got the single," Phillies manager Charlie Manuel said. "We had trouble doing some things."
In his last nine games, Stanton is batting .355 with a double, four homers and seven RBIs.
"You don't always need to hit it 400 feet to get an RBI," the slugger said. "Just put the bat on the ball, and it found a hole."
The Marlins loaded the bases in the fifth inning and built a two-run advantage on Justin Ruggiano's sacrifice fly that was run down by Victorino on the warning track in left-center.
Hunter Pence's one-out home run in the seventh inning edged the Phillies to within a run.
Pence has hurt the Marlins all season, as he is now 15-for-30 (.500) with four home runs and eight RBIs in five games.
"I don't know if we call him Pence or 'Pain,'" Guillen said. "He caused me a lot of pain. This kid, you know what, not that many people appreciate the way he plays."