PHOENIX, Arizona — Senator Barack Obama, the Illinois Democrat who said Sunday that he was considering running for president in 2008, has created a little sunlight between himself and both Bill and Hillary Rodham Clinton.

For one thing, he said, "When I was a kid, I inhaled."

"That was the point," Obama told an audience of magazine editors.

The direct admission was in contrast to Bill Clinton's denial in his 1992 campaign for president that he had smoked marijuana.

"I didn't inhale," Clinton said, cementing the idea that he liked to have things both ways.

Obama had written in his first book, "Dreams From My Father" (1995), before entering politics, that he had used marijuana and cocaine ("maybe a little blow"). He said he had not tried heroin because he did not like the pusher who was trying to sell it to him.