Apollodorus: The Birth of Hercules
[2.4.8] But before Amphitryon reached Thebes, Zeus came by night and prolonging the one night threefold he assumed the likeness of Amphitryon and bedded with Alcmena83 and related what had happened concerning the Teleboans. But when Amphitryon arrived and saw that he was not welcomed by his wife, he inquired the cause; and when she told him that he had come the night before and slept with her, he learned from Tiresias how Zeus had enjoyed her. And Alcmena bore two sons, to wit, Hercules, whom she had by Zeus and who was the elder by one night, and Iphicles, whom she had by Amphitryon. When the child was eight months old, Hera desired the destruction of the babe and sent two huge serpents to the bed. Alcmena called Amphitryon to her help, but Hercules arose and killed the serpents by strangling them with both his hands. However, Pherecydes says that it was Amphitryon who put the serpents in the bed, because he would know which of the two children was his, and that when Iphicles fled, and Hercules stood his ground, he knew that Iphicles was begotten of his body..
SOURCE: Loeb Apollodorus, translated by Sir James G. Frazer, 1921.