Jim Carrey has been cast in the comedy Ricky Stanicky.
The film will see the actor reunite with director Steve Oedekerk, who he worked with on Bruce Almighty and Ace Ventura: When Nature Calls.
The script is described as an ensemble comedy in the vein of The Hangover, and centres on a group of men who have used the excuse of a fictional friend, Ricky Stanicky, to get out of uncomfortable social engagements for two decades.
When their girlfriends and wives force them to set up a meeting with Stanicky, they hire an out-of-work actor to play the part.
James Franco was previously attached to play the Stanicky role.
Production on Ricky Stanicky is set to begin this summer.
Carrey will next be seen in Kick Ass 2.