The Flyers, who spent the first two periods allowing odd-man rushes at an alarming rate, fell into a 4-2 hole as Charlie Coyle got behind Robert Hagg and beat Hart from close range.
An all-alone Krejci continued the assault, converting a Nic Aube-Kubel turnover to score from out front with 15:39 remaining in the second, giving the B's a 5-2 cushion.
The Flyers, however, got two bizarre goals late in the second period to get within 5-4.
As he drove to the net against Jaroslav Halak, Sean Couturier (two points) lost control of the puck, but it trickled through the goalie's legs to cut the deficit to 5-3 with 6:48 left in the second.
Connor Bunnaman's first NHL goal made it 5-4 with 5:14 remaining in the session. Mark Friedman's point shot deflected off Bunnaman and off Boston defender Matt Grzelcyk and past Halak. (It was Friedman's first career point.)
"It's not exactly how I imagined it, but I'll take it," said Bunnaman, who was recalled from the Phantoms on Sunday. "I've been dreaming of this, so it felt good."
There were six goals -- three by each team -- in the wild second period, setting the stage for an intriguing finish.
(c)2020 The Philadelphia Inquirer
Visit The Philadelphia Inquirer at www.inquirer.com
Distributed by Tribune Content Agency, LLC.