US actor Tom Hanks has said he had to take a "moment to collect himself" after reading the final lines of Toy Story 4.