SAN FRANCISCO — Roy Halladay was relieved as he spoke Wednesday, but it will be months before he throws a baseball again for the Phillies.

Halladay will require arthroscopic surgery to clean fraying from his rotator cuff and labrum caused by a bone spur in his right shoulder. It is not the worst-case scenario for one of the game's great pitchers, who believes he can return before 2013 ends. Still, Halladay faces an arduous recovery and there are no guarantees he comes back to a contending team.

There is no hard timetable for Halladay's return until the procedure is performed, perhaps as early as next week. Halladay said doctors floated a three-month recovery period, but that is not definite. The doctors could find further damage to the shoulder when they scope it.

"The doctor seemed pretty optimistic that if what they saw is correct, I could come back and be a lot more effective and have a chance to pitch this year and turn back the clock," Halladay said. "He said he thought they could turn back the clock two or three years for me. I thought it was very good news. Obviously I don't want to miss time, but I think as far as scenarios go I feel like it's a lot better than some of the things I anticipated."

Halladay was examined by Neal ElAttrache, the Dodgers' team physician and a noted orthopedist to sports stars. Halladay said he has a partial tear to his rotator cuff and fraying of the labrum. Shoulder injuries are debilitating to a pitcher, especially one of Halladay's age (36 next week) and mileage (2,721 innings in 16 seasons).

But a full tear of the rotator cuff would have prompted more than a year of rehab and an uncertain future.

"I guess of the scenarios it could have been, it's a pretty good one," Phillies general manager Ruben Amaro Jr. said. "We still remain optimistic that he can come back and pitch at some time this year. If that's the case, and he can help us, that would be great. I don't have a crystal ball. I haven't looked inside his shoulder. So once they do and do what they propose to do, then we'll know more about his timeline and possibility to come back effective."

Amaro said the team will be active in seeking help for the starting rotation. Tyler Cloyd will start Friday in Halladay's place, but his spot is not guaranteed. John Lannan, sidelined by a knee injury, is weeks away from returning.

"We have to think about it," Amaro said.

Even if Halladay does return at some point, the Phillies will have to stay in contention without him. And there is no way of predicting how much the surgery can help Halladay, who posted an 8.65 ERA in seven starts.

Halladay said the examination Tuesday showed much greater damage to the rotator cuff when compared to an MRI taken last May. He did not feel excruciating pain because ElAttrache told him the area around the bone spur was so strong that it masked the problem.

"I was going in open-minded," Halladay said. "My biggest concern was I couldn't throw the ball where I wanted. I wasn't concerned about velocity, the pain wasn't overwhelming. I couldn't understand why my location was so poor. So I really didn't know what to think."

Halladay, who is being paid $20 million in 2013, will be a free agent at season's end.

"I'm not even thinking that far ahead," Amaro said. "Right now, we're just concerned about getting him healthy again. Who wouldn't want Roy Halladay around? He's one of the best pitchers of all time, as far as I'm concerned."

Contact Matt Gelb at mgelb@phillynews.com. Follow on Twitter @magelb.