PHILADELPHIA — Before the game, Kristaps Porzingis was asked what it would be like if the situation had been flipped. What if, in some other universe, he had gone to the 76ers in the draft? What if he had to be the one staring at a 1-26 record, like rookie Jahlil Okafor, with nary a seasoned veteran in sight?

“That would be tough,” he said, repeating himself for emphasis. “It’s not a good feeling.”

Being 1-27 can’t feel too good either.

The Knicks again were the beneficiaries of the 76ers’ historic march toward futility, building a 30-point lead and earning a 107-97 victory Friday night at Wells Fargo Center despite a capable performance by Okafor, who had the edge on Porzingis for most of the night.

One game after dropping 29 points on the Timberwolves, Arron Afflalo had 22 points and seven assists as the Knicks won their third straight to move to 13-14. The Knicks’ bench scored 52 points, led by Derrick Williams’ 17.

Carmelo Anthony had 16 points and four assists and Porzingis added eight points and three blocks for the Knicks, who took a 98-68 lead on Williams’ three-pointer with 10:20 remaining. Okafor led the 76ers with 20 points.

advertisement | advertise on newsday

“It’s rare in this game to kind of have games like that where you’re rolling,” said Anthony, who added that he was proud of the team for staying focused. “Mentally, we can easily overlook a game like this, a team like this.”

The Knicks went ahead by double-digits early in the second quarter, and the final margin was more an indication of coach Derek Fisher’s decision to rest his starters in the fourth quarter than any real late-game surge by the 76ers. That rest could pay some dividends, as the Knicks will face the Bulls — who lost to the Pistons in quadruple overtime Friday night — on Saturday night at the Garden.

“It’s really difficult to play 48 minutes of good basketball, but I thought tonight we put together enough good stretches to finish the game,” Fisher said. “That’s a tough situation to be in and you feel for those players in those cases.”

The Knicks took the lead on Afflalo’s three-point play with 7:27 left in the first quarter and began their steady climb over the 76ers’ litany of errors. Philadelphia, one of the worst teams in the league from outside the arc, went 0-for-7 from three-point range in the first quarter and shot 1-for-5 from the free-throw line to the Knicks’ 7-for-8. It was a portend of things to come, as the 76ers ended up shooting 17-for-30 from the line and 6-for-24 from three-point range.

The Knicks led by as many as 22 in the first half and went into the break up 65-44.

Knicks videos

Okafor got the best of Porzingis in the post twice in the second quarter, with a driving baseline dunk over the 7-3 Latvian and a layup past him three minutes later. But Porzingis made up for it with two booming blocks in the first half and a dunk on an assist from Afflalo to give the Knicks a 21-point lead with two minutes to go in the half.

“It’s exciting to go up against those guys,” said Porzingis, who faced first overall pick Karl-Anthony Towns of the Timberwolves on Wednesday night. “You kind of check yourself against those guys.”