Credit: John Parra/

Shocker! Casey Affleck says Joaquin Phoenix's bizarre behavior last year was all just a hoax.

Affleck, 35, filmed Phoenix's antics -- including a wacky appearance on the Late Show With David Letterman -- for the film I'm Still Here, which was released Sept. 10.

"It's a terrific performance," Affleck tells The New York Times. "It's the performance of his career."

Despite staying mum last year when asked if Phoenix's act was a hoax, he tells The Times, "I never intended to trick anybody. The idea of a 'hoax' never entered my mind."

The only thing real in the movie: Home footage of Phoenix, now 35, and his sibs performing on the streets of Los Angeles as kids.

Phoenix is set to return the Late Show With David Letterman Sept. 22.