Adam Sandler and Seth Rogen

Funny People got the last laugh at the box office.

The serious Judd Apatow comedy premiered at No. 1 with $23.4 million to win the weekend crown. Compared with Apatow's previous directorial efforts, Funny People's debut haul falls in between Knocked Up's $30.7 million opening and The 40-Year-Old Virgin's $21.4 million bow.

Watch clips from Funny People

Holding steady in second place was Harry Potter and the Half-Blood Prince, which reeled in $17.7 million to bring its three-week total to $255.4 million. It narrowly beat G-Force, which slid from first to third place with $17.05 million. The Ugly Truth followed in fourth place with $13 million.

The weekend's other new release, Aliens in the Attic, opened at No. 5 with $7.8 million.

See what Apatow and crew have to say about Funny People

Rounding out the top 10 were: Oprhan (No. 6, $7.25 million); Ice Age: Dawn of the Dinosaurs (No. 7, $5.3 million); The Hangover (No. 8, $5 million); The Proposal (No. 9, $4.8 million); and Transformers: Revenge of the Fallen (No. 10, $4.6 million).