At more than 7 feet tall, and over 300 pounds, it’s safe to assume that Shaquille O’Neal is someone you don’t want to irritate.

But that’s exactly what Boston Celtics star Kyrie Irving had to do while playing the title role in the new basketball comedy “Uncle Drew” (out Friday). For much of the movie, Uncle Drew and Shaq’s character, Big Fella, are locked in a feud, which eventually boils over. In one scene, the former LA Laker lays out Irving with the kind of punch to the head that you can feel in your seat. For anyone with a particular interest in seeing Irving suffer, the outtakes of the scene (which was shot multiple times) are included in the film’s credits.

But the 26-year-old point guard, who grew up in New Jersey, maintains that it didn’t hurt — at least not much. “It was a little scary to have Shaq coming at me, but I wasn’t bruised or anything,” he tells The Post. “It was just good acting!”

The movie is based on the character Irving first debuted in a Pepsi Max commercial back in 2012. Disguised in heavy prosthetics, Irving pretended to be the elderly “Uncle Drew” — the ultimate ringer, who would turn up to streetball games looking like a trash-talking no-hoper, but then wipe the floor with everyone in sight.

The full-length feature expands on the concept, and finds Uncle Drew getting drafted to save a flagging, cash-strapped amateur coach, played by Lil Rel Howery (whose love interest is played by Tiffany Haddish).

It’s Irving’s first full-length feature film, and he admits it was a big change from his regular job. “Acting is harder than playing ball, for sure,” he says. “I think I have an old soul to begin with, so channeling Uncle Drew wasn’t difficult. But being in a production with so many people, the hours of prosthetics and everything else was an adjustment. But it was fun, and I would do it again.”

The movie co-stars a host of other NBA stars and alumni, including ex-New York Knick Nate Robinson, former Indiana Pacer Reggie Miller and former Sacramento Kings legend Chris Webber. Unsurprisingly, Irving reveals that there were some epic one-on-one battles between takes.

“Nate was always trying to dunk on Shaq,” says Irving. “Shaq would be under the basket and Nate would try to dunk on his head all the time. He managed it, but only when Shaq wasn’t looking — Nate’s only 5-foot-9!”

The friendly rivalry extended from the court to the club, too. A memorable dance-off sequence in “Uncle Drew” shows that the cast has some serious moves not only on the basketball court, but on the dance floor, as well. And, as usual, Irving isn’t afraid to trumpet his personal skills. “Who’s the best dancer out of all us? I would say me!”

Hoops stars on the big screen

“Space Jam” (1996)

It seemed like such a weird concept: Bugs Bunny and Michael Jordan team up to play basketball and R. Kelly supplies the awful ballad “I Believe I Can Fly” on the soundtrack. But “Space Jam” was a huge hit on release, and reports say a sequel with LeBron James will be announced any day.

“Thunderstruck” (2012)

Before winning two NBA championships with the Golden State Warriors, former Oklahoma City Thunder forward Kevin Durant starred in this switcheroo comedy, in which he plays himself and finds that his talent has mysteriously transferred itself to a fan, while he’s left shooting bricks.

“The Fish That Saved Pittsburgh” (1979)

The one and only Dr. J, Julius Erving, stars in this disco-soundtracked cult classic about a failing Pittsburgh team that looks to astrology for inspiration.

“Eddie” (1996)

The New York Knicks have been legendary for losing the past few years, and once there was actually a film about that. In “Eddie,” Whoopi Goldberg stars as a loudmouth superfan who sits in the nosebleed seats and incessantly heckles the team. Then she becomes the coach, and the team wins. If only real life were that easy. NBA stars including Mark Jackson and Dennis Rodman appear, and Walt Frazier plays the Knicks’ broadcaster.

“Airplane” (1980)

In this satire, Kareem Abdul-Jabbar plays pilot Roger Murdock, who tries to hide his real identity as the NBA superstar from a kid who recognizes him and says, “I think you’re the greatest, but my dad says you don’t work hard enough on defense … ” Abdul-Jabbar responds: “Listen kid! I’m out there busting my buns every night. Tell your old man to drag Walton and Lanier up and down the court for 48 minutes.”