The company's new McCafe coffee drinks helped perk up results, which topped analysts' call for a rise of roughly 3 percent. McDonald's shares gained 1.9 percent in early afternoon trading and helped lift the broader stock market.
Closely watched same-store sales jumped 7.2 percent in Europe, 2.6 percent in the United States and 2.1 percent in the company's Asia Pacific, Middle East and Africa (APMEA) segment.
Europe especially was well ahead of expectations. The UK and France continue to drive things there, Edward Jones analyst Jack Russo said.
Still, UBS analyst David Palmer cautioned that results from Europe eventually will soften: We remain somewhat concerned about Europe (same-store sales) slowing over time, but current momentum is heartening.
In the United States, where diners have been struggling with the longest recession since the Great Depression, results got a boost from coffee drinks and traditional menu items, which include the Big Mac hamburger and Chicken McNuggets.
Results from the APMEA region were driven by momentum in Australia, which analysts said was partially offset by continued weakness in China, Taiwan and Japan.
McDonald's said late last month that it expected July same-store sales to be similar to or better than June's 2.6 percent rise.
McDonald's is one of the best-performing companies in the restaurant sector and the July results helped allay concerns stemming from disappointing June same-store sales.
With July's improved trends, we are encouraged by (McDonald's) ability to gain or maintain share in a still challenging environment, Oppenheimer analyst Matthew DiFrisco said in a client note.
Even as McDonald's benefits from its deep operating and marketing experience, DiFrisco said the July results suggest widespread improvement in July vs. June restaurant trends.
The world's largest hamburger chain and some other fast-food restaurants have benefited as the global economic downturn has led diners to seek out lower-priced fare, but long-term economic doldrums and rising unemployment have taken a bite out of breakfast and beverage sales.
McDonald's said systemwide sales slipped 0.3 percent in July but were up 6.2 percent excluding the impact of currency fluctuations.
The company recently has shifted its advertising toward its core and value menus and away from higher-priced food items -- with the exception of its new Angus burger, which is being introduced across the United States.
McDonald's offered free samples of McCafe mocha drinks on Mondays during July to entice U.S. consumers to try its new coffee-based drinks, which take aim at Starbucks Corp's
While some analysts had predicted that McDonald's entry into the fancy coffee market would spell doom for Starbucks, it appears the two operators continue to appeal to different customers.
Stifel Nicolaus analyst Steve West expects McCafe to boost same-store sales by a bit more than 2 percent this quarter.
West added that McDonald's 2.6 percent increase in July U.S. same-store sales was a bit better than rival Wendy's/Arby's Group Inc's
Burger King Holdings Inc
Shares of McDonald's rose $1.05 to $56.25 in early afternoon trade on the New York Stock Exchange. Shares in rival Burger King were down 1 percent to $17.26 while Wendy's/Arby's shares fell 3.2 percent to $5.09.
(Additional reporting by Jessica Wohl; Editing by Derek Caney, John Wallace and Gunna Dickson)