As five people who spend just about all of their waking time together, you’d think the Gang would have had a group text going for the last several years. But as we learned this week in “The Gang Texts,” the fifth episode of the season, the group is only now embracing texting, in order to pay a visit to the Philadelphia Zoo.

It may not be the actual zoo, but the Gang’s misadventures with messaging, emojis and animals add up to the funniest It’s Always Sunny in Philadelphia of the year so far.

The show begins with the Gang minus Frank near the Zoo entrance, with Mac and Charlie wearing meerkat hats, and Mac declaring he can’t wait to see the critters. (Fun fact: the collective noun for meerkats? Gang.)

Dee suggests they all “stick together,” with Dennis explaining that his sister “got lost at the Zoo when we were 7,” and was trampled by animals at the petting zoo.

To that end, Mac announces he’s started a group text chain, which soon devolves mostly into strings of emoji. This leads to a discussion between Mac and Charlie about what they can learn from meerkats, who urinate on one another to mark their territory. Frank arrives with bananas, which he says he’s brought in order to “taunt the gorilla.”

How do we know this isn’t the actual Philadelphia Zoo? The parking lot isn’t actually that close to the entrance, the real zoo isn’t known for its churro stands or for sea lions, and we even see a glimpse of elephants, which the real Philly zoo famously did away with in 2009.

The episode revisits the season-long thread in which Mac appears to be in love with Dennis, shifting his long-held denial about being gay into a similar denial about his crush on his friend. We see a couple of extensive, heartfelt texts from Mac to Dennis, to which Dennis merely replies “k” — known universally as the most dismissive response you can give.

Mac declares his intention to visit the bathroom, as bathrooms at zoos are “big Grindr spots for closeted dads.” Indeed, the website Cruising Gays does list the Philadelphia Zoo as one of its top spots in the Philadelphia region.

Dee relives her childhood nightmare, first of being separated from her family, and then being trampled by the petting zoo animals. This is a hilarious visual, as is the brief scene in which Frank, not-so-surprisingly, is outsmarted by the gorilla.

The episode has a rare-for-Sunny happy ending, in which the Gang sticks their heads into the meerkat bubbles as “The Circle of Life” plays. The facial expressions alone are priceless.

Sunny notes:

– “The Gang Texts” was written by Rob McElhenney and Charlie Day, and directed by Tim Roche, who is credited with editing dozens of episodes of the series.

– It’s not quite clear where exactly the episode was shot, but a Los Angeles-based Twitter user named Nicky Gallo tweeted in July that his “office” was turned into the zoo for an Always Sunny episode. And McElhenney and Day shared an Instagram post in their meerkat hats on July 9, three days before Gallo’s post.

– The characters’ emulating meerkats by urinating on each other, as they do multiple times in the episode, was made possible in part by Gang’s successful scheme, in the episode two weeks ago, to get public urination legalized in the city of Philadelphia.

– Clever as this episode’s use of texts was, the best texting-relating moment in recent TV history remains the “Hey! Dot dot dot” sequence from You’re the Worst.

– Next week: A film noir parody called “The Janitor Always Mops Twice,” as “Charlie navigates the seedy underbelly of Philadelphia when Frank is ‘diarrhea poisoned.”