Shareef O'Neal will miss his freshman season at UCLA after undergoing heart surgery. (Gregory Payan/Associated Press)

Shaquille O’Neal’s son, UCLA recruit Shareef O’Neal, will sit out his freshman season to recover from heart surgery, he said Friday.

O’Neal, 18, did not reveal the condition doctors detected, but told TMZ Sports, which first reported the story, he “felt funny” during one of his first summer practices with the Bruins. The team’s medical staff gave him a heart monitor, he said, and told him to press a button on the device if he felt unwell again.

Several practices later, he did press the button and doctors found what O’Neal described as “something serious and pretty risky.”

“Thank God the UCLA medical staff caught it early,” O’Neal told TMZ.

O’Neal, a 6-foot-9 power forward and the No. 41 recruit in the class of 2018, according to scouting service 247Sports, will take a medical redshirt his freshman year, which allows him to remain on scholarship at UCLA and preserve all four years of eligibility.

“During my rehab, I’ll be attending my classes and being a normal student,” he said.

“I’ll be back in no time,” he added.

Read more from The Post:

LSU basketball player Wayde Sims killed in Louisiana shooting

Anthony Rendon, the Nationals' super-quiet superstar, finds a reason to use his voice

No telling how Bryce Harper saga will end, but Nationals have options

Doug Williams says Adrian Peterson’s Redskins visit caught Daniel Snyder and Bruce Allen off guard

Ohio State deletes ‘Silence’ tweet ahead of game against Penn State