(CNN) -- When NBA All-Star Carmelo Anthony announced earlier this month he was just finishing a 15-day fast, it caught even his closest allies off-guard.
Everyone from New York Knicks coach Mike Woodson to teammate Amare Stoudemire said they had no idea Anthony was on a special diet.
Others were skeptical: Could a professional athlete really survive, much less perform, without eating for 15 days?
It turns out, he probably didn't. Anthony cut out meat and carbohydrates but did take in some calories, according to media reports.
Nutritionists say he was pushing his luck, even with that modified version.
"Athletes need a regular intake of carbohydrates and protein, not only to fuel their activity, but to recover," says Marie Spano, a sports dietitian from Atlanta who works with professional basketball, baseball and football players.
Jennifer Gibson, a sports dietitian at the U.S. Olympic Training Center in Colorado Springs, suspects he might have simply cut out meat or tried some kind of liquid diet: "With a no-food fast for 15 days, we would have seen a noticeable change in his body, and we didn't."
Moore says a serious athlete should forget fasting altogether -- "if you're on a quarter tank of gas, you're not going to compete well" -- but if you do decide to try fasting for religious or other reasons, there are a few things to keep in mind.
If you choose to avoid food for any length of time, you still need to stay hydrated. The human body can function fairly well for up to three days without food, but you shouldn't go even a few hours without ingesting water or juice, say nutritionists.
Keep it short
It takes about three days without food for the body to go into an unhealthy starvation mode -- less if you don't have a big meal before the big fast, according to Gibson.
It takes about a day for the body to run through stored carbohydrates and start to burn fat and protein for energy. Burning fat may sound tempting, but around the three-day mark, it leads to a buildup in the bloodstream of acids known as ketones -- a condition known as ketosis, which can result in nausea, dizziness and stomach pain, along with severe bad breath. As days turn to weeks, it eventually leads to organ damage.
A two- or three-day fast might not be dangerous, but even just a few hours without calories will impact performance, especially for an athlete.
"As you get lower blood sugar, you're feeling some fogginess and dizziness, even if you keep hydration up," Gibson says. "You can function, but there's a point you realize where you're not functioning optimally."
Don't fast to lose weight
"I can't recommend fasting," says Marisa Moore, a dietitian in Atlanta. "If people want to do it for discipline or mental clarity, that's OK. But my concern is for the other 360 days a year."
"You have to look at sustainability," agrees Gibson. "A lot of people fast for a week, and all they think about is what they'll binge on when they're done. It's not teaching anyone a healthy relationship with food."
Planning is critical when you place constraints on your diet. For example, last year during the monthlong Ramadan, Gibson laid out a special meal plan for Olympic fencing hopeful Ibtihaj Muhammad.
During Ramadan, observant Muslims avoid eating or drinking between dawn and dusk, so Gibson focused on the narrow windows when Muhammad was allowed to eat. "We focused on foods that are really easy to digest and not overly fatty," Gibson says. "Things like rice, applesauce and yogurt -- everything in small chunks of food."
Even so, Muhammad cut back her training during Ramadan, backing off when she felt tired or dizzy. Gibson notes that planning can be even tougher for people juggling jobs and families.
Fasting isn't for everyone
Some people should never fast: pregnant women, anyone on medication that needs to be taken with food and diabetics -- not to mention anyone else with a medical condition that requires regular food intake. Moore adds that people younger than 18 should also never fast.
"They're still growing and developing, and it can also set up psychological issues with food."
New Year's resolution or not, Anthony said last week in London he is starting to get his energy back and that he doesn't regret the experiment.
"It was just something I wanted to do. I think at times in life you just need clarity on some things and you just want to rebuild your body up, and rebuild your mind, and just clear everything up, and start afresh." With a wide smile, he added, "I'm back eating now!"