The irreverent FXX sitcom caps its 12th outing Wednesday with its debauchery, cleverness and laughs at near all-time highs.

Receive the latest entertainment-news updates in your inbox

(L-R) Actors Rob McElhenney, Glenn Howerton, Kaitlin Olson, Danny DeVito and Charlie Day act during a dance scene on the set of "It's Always Sunny In Philadelphia."

The most recent season of "South Park," which wove presidential politics, cyber trolling and space exploration into a timely tapestry of tastelessness, offered a TV rarity: an irreverent show that unspooled its best outing nearly 20 years in.

But "South Park" isn't the only long-running raunchy comedy to grow in its storytelling prowess without growing tired.

"It's Always Sunny in Philadelphia," a live-action cartoonish celebration of cretinism, caps its 12th season Wednesday with its debauchery, cleverness and laughs at top levels.

Sophistication isn't a word usually associated with the FXX comedy about Paddy's Pub, a Philly dive where schemes are born and dreams go to die. But the show's degenerate characters – Dennis, Dee, Mac, Charlie and Frank – regenerated and mutated nearly 12 years in, taking their acquired-taste, bitter comedy to new, sometimes surreal places.

Cases in point: the season opener, in which the white losers become black and find themselves trapped in a "Wiz"-like musical fantasia – and facing some very real bigotry. Or take the episode in which Dennis edited surveillance footage of Charlie and Mac's bickering roommate moms – and added a laugh track – to create a sleazy sitcom. The show blew the doors off Mac's closeted life with an installment centered on an unprintable anti-gay slur – and featuring an even less describable homemade exercise bicycle.

The cast members, who display far more ambition than their TV alter egos, keep getting back on the bike and pedaling to the edge. "It's Always Sunny" is set to air for at least two more seasons. That’s far behind “South Park” – but would tie family friendly classic “The Adventures of Ozzie and Harriet” for the longest-running live-action sitcom of all time.

Meanwhile, the gang is off on their own adventures elsewhere. Kaitlin Olson stars in Fox’s “The Mick.” Charlie Day shares top billing in the movie comedy “Fist Fight.” Danny DeVito can currently be seen on Broadway in a revival of Arthur Miller’s “The Price.”