The Walt Disney Company didn’t disappoint, beating analysts’ expectations for earnings and revenue in its second fiscal quarter ended March 30 on the back of a resurgent theme parks business.

The company’s stock rose briefly after hours Wednesday by nearly 2 percent. It opened at $133.50 and closed at $134.99, up 1.16 percent.

Revenue improved to $14.9 billion, a 3 percent increase year-on-year. This total compares favorably to the $14.36 billion expected by a Refinitiv survey of analysts. Earnings per share came to $1.61 (ex-items) versus $1.58 per share expected, per Refinitiv.

Analysts said Disney's stock is going great, up more than 22 percent since the start of the year. Its market cap has hit $240 billion.

Disney’s theme parks delivered a welcome bump to quarterly earnings better than analysts’ expectations. This boost helped offset a wave of expenses aimed at boosting Disney’s nascent streaming media business that will butt heads against Netflix and Apple. In April, Disney unveiled Disney+, a subscription video on-demand service. Disney+ will debut later this year at a cost of only $6.99 a month.

Disney said operating income growth at its domestic theme parks and resorts was caysed by increased guest spending and higher attendance and occupied room nights at Walt Disney World Resort. It said revenue from its Parks, Experiences and Products segment rose 5 percent to $6.2 billion. Segment operating income rose 15 percent to $1.5 billion.

Operating income growth also was traced to growth in domestic theme parks and resorts, increases in the consumer products business and cruise line, and higher attendance and occupied room nights at Hong Kong Disneyland Resort.

During Q2, Disney wrapped-up its $71 billion acquisition of 21st Century Fox’s entertainment assets. The company earned $373 million in revenue and $25 million in operating income from its 11 days of ownership of Fox, which became part of Disney on March 20.

Disney said diluted earnings per share (EPS) from continuing operations for Q2 increased 81 percent to $3.53 from $1.95 in the prior-year quarter. EPS for the quarter decreased 13 percent to $1.61 from $1.84 in the prior-year quarter.

EPS from continuing operations for the six months ended March 30, 2019 increased to $5.42 from $4.86 in the prior-year period.

“We’re very pleased with our Q2 results and thrilled with the record-breaking success of 'Avengers: Endgame,' which is now the second-highest grossing film of all time and will stream exclusively on Disney+ starting December 11th,” said Chairman and CEO Bob Iger.

“The positive response to our direct-to-consumer strategy has been gratifying, and the integration of the businesses we acquired from 21st Century Fox only increases our confidence in our ability to leverage decades of iconic storytelling and the powerful creative engines across the entire company to deliver an extraordinary value proposition to consumers.”

In this handout image provided by Walt Disney World Resort, Disneyland guests and Cast Members celebrate Mickey Mouses 90th birthday during a festive cavalcade down Main Street U.S. at Disneyland park in Anaheim, California, Nov. 18, 2018. Joshua Sudock/Disneyland Resort via Getty Images

Disney said its direct-to-consumer segment grew 15 percent year-over-year to $955 million. But it admitted its operating losses more than doubled as a result of investments into ESPN+, the upcoming launch of Disney+, and consolidation of Hulu, where Disney has a controlling stake.

Studio Entertainment revenues fell 15% percent because of difficult comparisons with last year's quarter, which featured hit movies "Black Panther" and "Star Wars: The Last Jedi."

Disney's newest blockbuster hit, "Avengers: Endgame," broke $2 billion in ticket sales in 11 days and will be reflected in the company's next report.