CHICAGO — Andrew McCutchen had homered in two straight games and is one of baseball’s hottest hitters, but Joe Girardi left him out of Thursday night’s Phillies lineup. Rhys Hoskins had homered in three of the last five games yet was on the bench when an 8-0 win over the Cubs began.

The Phillies manager opted to rest two key pieces of his batting order, deciding instead to plug in left-handed hitters Brad Miller and Travis Jankowski for the series finale at Wrigley Field against right-handed pitcher Adbert Alzolay, who has much better splits this season against right-handed hitters than lefties.

“They are drastic. It’s about as drastic as you’d see,” Girardi said before the game as Alzolay entered Thursday holding righties to a .289 slugging percentage while lefties slugged .608 against him. “It’s a fairly large sample size. ... I just try to look at some of the numbers.”

Girardi’s gamble worked out as Miller — who had not homered since June 6 — homered three times, including two off Alzolay. Three batters before Miller’s second homer, Jankowski bunted for a single to start the fifth inning. Girardi played the numbers and was rewarded for it.

It was the first time a Phillies player hit three homers in a game since Jayson Werth homered three times on May 16, 2008, against Toronto.

“I felt like I was dreaming,” said Miller, whose parents were in the stands. “I came here in high school with my family. It’s one of those iconic baseball parks. It was fun.”

McCutchen entered Thursday with a 1.011 OPS since June 1, which is the fourth-best mark among National League hitters. And since June 1, no Phillies player has appeared in more games than McCutchen or Hoskins. They enjoyed a night off.

“I think you have to remember that he’s not 25 anymore,” Girardi said of the 34-year-old McCutchen. “And if you do wear him down, he’s probably not going to swing well. You have to take everything into account. Long games, and the little thing with the cramping on Sunday, two long games here.”

» READ MORE: A phone call from Joe Girardi helped J.T. Realmuto fix his swing and return to his All-Star self

Miller’s hat trick

The Phillies were prepared had Miller hit a fourth homer as Dan O’Rourke, the team’s equipment manager, brought four home-run hats to Chicago. Miller stacked three on his head after his third homer of the game and a fourth was ready if needed.

“I had no idea until Dan O brought it down from the clubhouse,” Zach Eflin said. “It’s nice to know we’re prepared.”

The Phillies may not have envisioned Miller having a three-homer game when they signed him this winter for $3.5 million, but they did expect him to be a key contributor off the bench.

But after a strong first two months, Miller scuffled in June as he went 2-for-34 with 19 strikeouts.

His July has been much better. Miller hit a game-winning, pinch-hit double last week against the Padres and now has six hits this month in his first 10 at-bats. When he’s hitting well, Miller is a valuable piece as he can play nearly every position plus come off the bench as a left-handed pinch hitter.

“As hard and frustrating as it is to have a couple weeks there where I felt like I didn’t contribute at all,” Miller said, “but to turn the page, I guess, and say ‘Hey, I’m only focusing on the future.’ Because focusing on that was eating me up inside. To be able to contribute feels really nice and shows that our work is paying off.”

Miller had a chance in the ninth to hit his fourth homer of the game but popped up against former Phils left-hander Adam Morgan. Miller watched the video replay on the left-field scoreboard after returning to the dugout and slammed his fist, seeming to know that he just missed it.

“I was trying to earn that fourth one,” Miller said.

» READ MORE: Phillies scouting director Brian Barber sees plenty of high school talent and college pitching in the MLB draft

Friendly confines

The Phillies won a series at Wrigley for the first time since 2015 as they scored 39 runs and homered 13 times while winning three of four. Four days on Chicago’s North Side may be enough to jump-start an offense that entered the month below the league average in most offensive categories. Or maybe it was just four good days against a team that has lost 12 of its last 13 games.

“It’s the best series that we had, definitely,” Girardi said.

Another Girardi gamble

McCutchen had his helmet on and was ready to pinch-hit for Eflin with the bases loaded in the sixth inning, but Girardi pulled him back and let the pitcher bat with two outs. The Phillies were then ahead by four runs and a hit could have broken the game wide open.

“I just liked the way he was throwing,” Girardi said. “I didn’t know we were going to get a bunch of runs the next inning, but then you’re asking your back three to give you four innings and if we didn’t have to do that ... After the first two innings, he was excellent.”

The manager chose to go with his pitcher, who was then at 89 pitches. Eflin grounded out but retired the three batters he faced in the bottom of the sixth, which lessened the load on the bullpen by three outs. The Phillies scored four times in the seventh as Miller hit his third homer and the game was then broken wide open.

Eflin pitched six shutout innings, allowed five hits, struck out five, and walked just one. He ended his first half with a 3.88 ERA in 17 starts.

“I thought it could have went a lot better,” Eflin said of his first half. “But I’m happy with the way I battled, especially when my back’s been up against the wall. I could have done without a couple innings, but that’s baseball. I’m confident and I’m healthy headed into the break.”

Up next

The Phillies open a three-game series on Friday in Boston against the Red Sox, who have won 10 of their last 13 games. Vince Velasquez starts the series opener against right-hander Garret Richards. The Phillies will end the first half on Sunday against Nick Pivetta.