Sweaty, disheveled and with dried blood on two-day stubble, a guy tells a bride-to-be she should forget the wedding she’s got in five hours. Unspoken among best-man duties — not losing the groom in Vegas during a bachelor party you can’t remember. But Phil — with groomsmen Stu and Alan — has done precisely that.

The Hangover’s opening is as disorienting as the first head-pounding saunter to the bathroom after a night of getting schnockered. Uh, wait, isn’t this a Todd Phillips movie? Shouldn’t there be goofy male bonding, not grim moments of failure?

In his funniest movie since Old School, Phillips generously serves up a comic cocktail — neat with a sidecar of Tabasco. Make no mistake: The Hangover is face-ache, lean-forward-and-clap funny, building to a delirious fever-pitch point. With bathroom tigers and Mike Tyson singing Phil Collins — among many other oddities — it would be doing something wrong if it didn’t.

But Phil, Stu, Alan and, most of all, Doug (the missing groom) are in serious trouble, and the movie’s wackiness never tosses that to the wayside. It’s the breezy genre blend that the joylessly leaden Pineapple Express failed to evoke, a comedy driven as much by convincing characters as crazy situations, and the movie that will have audiences uncertain of how to pronounce Zach Galifianakis but sure he’s a star.

Following the prologue, the film flashes back two days, as Doug (Justin Bartha) prepares for his bachelor party with his two best friends.

Phil (Bradley Cooper of Wedding Crashers) is a teacher pilfering his students’ field-trip money for poker antes, as well as a marriage-bemoaning husband and father. Stu (Ed Helms, The Office) is a dentist who’s beyond a pushover — think shove-over — for his shrewish girlfriend (Rachael Harris), to whom he’s lied about the festivities.

She thinks they’re going to Napa. But they’re hopping in a Mercedes and heading for Sin City. Also in tow is Alan (Galifianakis) — Doug’s future brother-in-law, and the pricelessly daffy, well-meaning rhombus trying to squeeze into this circle of friends.

Here, writers Jon Lucas and Scott Moore — atoning for the execrable Four Christmases — depart from the dude-humor blueprint. Phil, Stu and Alan awake to find Doug gone, their Caesars Palace villa trashed and their memories empty of what happened.

Like a nyuk-nyuk noir, they piece together clues on run-ins with Tyson (sportingly riffing on his bad behavior), an effeminate gambler (the great Ken Jeong) and a vibrant prostitute (Heather Graham) to deliver Doug back to his bride.

While hardly a character study for Cooper and Helms, The Hangover affords them slightly more than conventional roles of smooth-talker and clenched nebbish.

Albeit with more profanity, Helms channels Charles Grodin’s rat-a-tat pessimism, but cheerfully enough that you root for him to somehow sow his oats. Cooper is a little slyer, learning hard responsibility lessons as the trio’s ersatz leader. (And they are hard lessons, thanks to tire irons, tiger claws and T-bone auto accidents.)

But this movie belongs to Galifianakis — a coincidental co-star of What Happens in Vegas (which, comparatively, is as tame as a Louie Anderson routine). It’s as if John Belushi went native, grew a bush on his face and crawled back to the city from the forest floor. (All the better to sell his uproarious “wolf pack” friendship soliloquy).

Alan has so many seemingly idiosyncrasies that Galifianakis could make an entire other film from them. He still uses a pager. He’s not allowed within 200 yards of a school … or Chuck E. Cheese. He inquires whether Caesar really lived at Caesar’s Palace. As Stu will later remark, “Don’t let that beard fool you. He’s a child.”

Each of Alan’s rib-tickling tics (mimicking Phil, bonding with the aforementioned baby) feels like insanely inspired improvisation from Galifianakis — who lobs the gauntlet for supporting comedy roles in 2009, and creates a character that’s flaky but fiercely sweet.

Overall, The Hangover can be forgiven its grenadine-splash of a coda. Phillips excels at freewheeling films brimming with ball-busting machismo. And yet, as in Old School, he seems to genuinely cherish the assets of adult male life — maintaining backslapping bonds from long ago and forging ones you didn’t expect. Just as a marriage is built on the strength of love and promises kept, so can a bromance. In The Hangover, that’s an honorable idea, hilariously carried all the way through to one of the best end-credits montages ever made.