Hart missed nine games after he strained his lower right abdominal muscle during practice on Jan. 15.
"Maybe a couple shots and I was good to go," Hart said. "I kind of did all the work in practice with our coaches and our staff to make sure we did any scenario that would test my injury and see how I felt. You get a couple (shots) early and it gets you into the game."
WATCH: [All Panthers vs. Flyers highlights]
James van Riemsdyk had a goal and an assist for Philadelphia (31-18-7), which won for the eighth time in 11 games (8-2-1).
The Flyers, with 69 points, moved two points ahead of the Carolina Hurricanes for the second wild card into the Stanley Cup Playoffs from the Eastern Conference.
MacKenzie Weegar scored for Florida (29-20-6), which has lost three in a row and is 1-4-1 in its past six games. Sergei Bobrovsky, in his 500th NHL game, made 30 saves.
The Panthers trail the Toronto Maple Leafs by two points for third place in the Atlantic Division. They are five points behind the Flyers.
"I know we're frustrated with a few things and we can make excuses up, but we've got a great leadership group in here and we have great guys in this room," Weegar said. "We pick everybody up and we're not too worried about it. We'll get scoring [and] we'll finish off in the right way this year."