PHILADELPHIA — Tim Hardaway Jr. has been playing with the dreaded plantar fasciitis in his right foot for the last three weeks — a chronic heel ailment that could affect him the rest of the season, according to Knicks coach David Fizdale.

Hardaway returned to the lineup in Wednesday’s 131-109 loss to the 76ers and broke out of his shooting slump with a 27-point night, making 3-of-7 3-pointers, and going 10-for-10 from the line.

“Plantar fasciitis is nagging,” Fizdale said before the game. “Some days it aches so bad, you can’t move on it. Other days you can tolerate. He’s trying to manage it.”

Hardaway is the Knicks No. 1 option because of Kristaps Porzingis’ season-long knee rehab that could be drawing to a close. Averaging a team-high 21 points, Hardaway saw his shooting percentage drop to 39.5 percent entering Wednesday’s contest. Hardaway was 1-of-11 in Philly in the Nov. 28 meeting between these teams before he reversed himself.

“I know he’s been fighting through it a lot,’’ Fizdale said. “I know he doesn’t want that as an excuse. I don’t want to put it out as an excuse. He’s been fighting through it for a while now. I don’t know if it’s had any impact on his shooting or not.”

Asked if he would shut down Hardaway, Fizdale laughed and said, “I can’t shut Timmy down. I need some baskets.’’

The Knicks $71 million signee could miss more games in the future with the ailment that needs long-term rest to heal. Last December, he suffered a stress fracture in his leg that cost him six weeks.

“He’s going to tell us,’’ Fizdale said of his future availability. “We’re going to treat it. The more he can tolerate, that’s how much we’ll go with it. When he can’t take it anymore, that’s when we’ll give him rest.”

Plantar fasciitis can heal only after the inflammation subsides.

“You’re out like a week or so and you’re good after that but I don’t want that to happen,’’ Hardaway said.

Trey Burke, who struggled with his shooting in his first two games back from a sprained knee, did not play.

Enes Kanter gave Devin Booker his due after Booker taunted Kanter in their escalating Twitter war after Monday’s 128-110 shellacking. Booker rang up 38 points and tweeted “Pick n Roll at 00 every time’’

“The game was two nights ago,’’ Kanter said. “We didn’t win. What can I say? We lost. He scored 38. Respect.’’

Their tête-à-tête started last January when they engaged in a shoving match leading to Booker’s ejection in the Knicks’ win in Phoenix. Sources indicate Kanter has the March 6 rematch circled on his calendar.