Funnyman Will Ferrell played a cruel prank on Zach Galifianakis by giving him a fake BILL COSBY signature after learning THE HANGOVER star had pined for the autograph since childhood.

The actors played rival politicians in The Campaign, and Ferrell reveals he and Galifianakis became quite close by the time they finished shooting the satirical film, and even handed each other parting gifts.

But the Elf star admits his present was not the genuine article, telling Britain's The Sun, "Zach told me how he had written to Bill Cosby as a kid but he never wrote back. So I got Bill Cosby's book and a headshot and forged his signature.

"I signed it, 'Better late than never - The Cos.'"

Ferrell softened the blow by tracking down a real signed book for his pal, who was thrilled with the token - but sad to wrap their collaboration.

Galifianakis adds, "I wrote an email to Will in a coffee shop in New Orleans to tell him it was the best job I had ever had. I was crying when I wrote it. It was the best work experience I have ever had for sure."