For the Flyers, their playoff hopes just about extinct, eight is enough.

Eight games to end their underachieving season.

Eight games before management can access what went wrong and how it can be fixed.

Eight games to tinker with the lineup and perhaps find out something about prospects like Wade Allison, Jackson Cates, Cam York, Egor Zamula, Pascal Laberge, and Felix Sandstrom.

Those final eight games probably won’t come close to duplicating Sunday’s crazy ending at the Wells Fargo Center.

Claude Giroux scored twice in the final 1 minute, 26 seconds of regulation to send the game into overtime, and the Flyers beat the Devils in the shootout, 4-3, on Kevin Hayes’ goal in Round 6.

The Devils have lost 10 straight and have just one win in their last 15 games.

“It’s a tough league to win in. Very competitive,” coach Alain Vigneault said. “You see the skill level from that team [New Jersey] even though they’re going through a tough time. It took everything we had to win.”

» READ MORE: How will Flyers get better? GM Chuck Fletcher has interesting options. | Sam Carchidi

The Flyers (22-19-7), in the first of four straight meetings with New Jersey, were able to win because Giroux put them on his diminutive back.

“No doubt, it hasn’t gone the way we wanted,” Vigneault said of the disappointing season, “but one thing we’ve gotten from our captain is 100% every game. He comes to play, he comes to compete, and he’s been a real solid example for our team. He’s doing everything he can to steer the ship in the right direction.”

Added Vigneault: “He knows he has so many kicks at the can left … At some point, for all his effort, he’s going to get rewarded. I’m confident of that.”

With Flyers goalie Brian Elliott pulled for an extra attacker, Giroux scored twice to tie the game, 3-3. He scored with 1:26 left and then with 1:04 remaining.

Giroux moved into third place in franchise history with 850 points, surpassing Brian Propp.

“Brian Propp was a great player here,” said Giroux, who, along with Hayes and Sean Couturier, scored in the shootout. “Being able pass him is an honor, and being able to win this game feels even better.”

Giroux “brings it every night and you just kind of expect him to climb up the ranks,” Elliott said. To be third “in such a storied franchise is pretty special.”

Pavel Zacha had scored on a one-timer from the slot midway through the third period to increase the Devils’ lead to 3-1. With the way the Flyers had been scoring – they haven’t produced more than three goals in 14 straight games – that lead seemed insurmountable.

And then Giroux struck in the waning minutes of regulation. Twice. Twenty-two seconds apart. It was the quickest he had ever scored two goals in his career, and the fastest pair of goals by the same Flyers player since Jaromir Jagr scored 18 seconds apart in 2012, per the NHL.

James van Riemsdyk and Jake Voracek set up both of Giroux’s goals.

“We had one mission – to defend the six-on-five – and we didn’t do it,” Zacha said. “We have to win games like that.”

Earlier, New Jersey (14-27-7) took its first lead in the last nine games – a span of nearly 355 minutes – as Michael McLeod finished off a three-on-one with 15:04 left in the first. Defensemen Samuel Morin and Phil Myers were caught up ice, leaving Giroux as the lone defender.

The Flyers have allowed the first goal in 16 of the last 18 games, including the last seven.

The Devils’ lead was short-lived. Less than seven minutes later, Couturier made a clever backhand deflection on Myers’ blast, putting the puck past Mackenzie Blackwood to knot the score at 1. It was Couturier’s 14th goal in 37 games. Van Riemsdyk leads the Flyers with 16 goals in 48 games.

Cates, playing in his second NHL game, nearly scored his first goal, but Blackwood made a nice stop on his left-circle drive with 42.2 seconds to go in the first.

Early in the second period, Cates had another great chance turned aside by Blackwood as he tried to finish a two-on-one with Allison.

The Devils took a 2-1 lead when a falling-down Nathan Bastian (two assists) outworked Morin and Myers and he fed a wide-open Miles Wood (two points) for a tap in with 12:53 remaining in the second. Elliott, who stopped Zacha on a first-period breakaway, had no chance.

Elliott, 36, a pending unrestricted free agent, made his fifth start in the last seven games as he tries to make a case that the Flyers should re-sign him after the season.

He made 29 saves Sunday, and he stopped Nico Hischier in the shootout to clinch the win.

“He’s fought for the net pretty much his whole career,” Couturier said. “… Tonight, he made some big saves and gave us a chance to win the game.”

Breakaways

Bobby Clarke is first in franchise history with 1,210 points, and Bill Barber is second with 883 points -- 33 more than Giroux. ... Ivan Provorov had an assist, blocked three shots, and was plus-3 in 29:01 of ice time. ... Scott Laughton had five shots and three hits while winning 11 of 13 faceoffs (85%). ... Travis Sanheim (4 shots, plus-1) played 25:38, tied for the second-most ice time in his career. ... Morin (3 hits) was minus-2 and played just 11:26.