It’s worth noting that Year One deploys the old “goodwill end credits” tack, displaying a montage of gaffes under its closing credits.

This is nothing new, per se, of course, but crucial to any theatrical blooper reel is the fact that it must be funny, of a piece with the tone of what preceded it, relatively fast-moving (repeatedly flubbed lines from a single sequence often serve to undercut this dictum) and, if it wants to really stand out, cast one or more of its stars in a marginally bad light (e.g., Chris Tucker’s cell phone repeatedly going off during the filming of Rush Hour 2). In this sense, the end credits for Year One really work, crammed as they are with Jack Black ruining a scene by accidentally farting, and the sounds of a train in the distance repeatedly disrupting shots; the latter especially connects, because it underscores in winking fashion the movie’s mock-period setting, which is faithfully if not exactingly rendered.
Incidentally, of arguably the same genus if not family is the leave-’em-dancing credit sequence. Going back at least a decade, the Farrelly brothers pioneered the use of an end-credit, out-of-character, cast and crew sing-along montage set to a single, particularly peppy song (was this part of 1996’s Kingpin? I can’t remember), a move which has on occasion been appropriated by dreadful films like Lethal Weapon 4, in an attempt to erase any memory of the previous 100 minutes or so of pain and suffering. Will Smith’s Hitch, with its shut-down set to Heavy D’s “Now That We Found Love,” worked fantastically in this regard, since there was both a wedding closing the film, and the instruction of rhythm and appropriate dancing figured at least nominally into the movie’s plot.