This orally transmitted children's rhyme has been recorded in many memorates and is discussed in the anthropological literature about this genre of folklore.
It is known to have been current in the late 1950s and up until the 1970s, and it was sung in places that include
Britain (England, Scotland, and Northern Ireland) and
the Antipodes (Australia and New Zealand).
Variations have been reported in
the identity of the unfortunate protagonist,
the final length of his organ once he has received the arguably rather disproportionate comeuppance for his pride, and
the level of specification of the reptile for which it gets mistaken.
a) Identity of the protagonist
Ian Turner et al, in their work Cinderella Dressed in Yella (1978), report a variant current in Melbourne, Australia, between 1962 and 1973 featuring "Old King Cole", who is also the protagonist in one of the best known rhymes in the 4/4 time which is widespread in this genre.
A version with "Good King Billy" is reported in Northern Ireland, which I have found online in a memorate and which is referred to in Hamish MacDonald's The Gravy Star (1999) and by Michael Rosen in his Penguin Book of Childhood (1995), dated to 1958.
Other variants have "My cousin Billy", "My Uncle Billy", and "Buffalo Bill".
b) Length of his body part at the end of the rhyme
"Four foot four" is the most common end state, but versions have been recorded with "two foot foor" or "five foot four". (Jonathan Blyth, The Law Of The Playground: A Puerile and Disturbing Dictionary of Playground Insults and Games, 2004.)
c) The reptile that the second party believes she sees
In most recorded versions, the second party - whether she is described as the girl next door or as a neighbour - mistakes the protagonist's penis for a generic snake. But in her article "The Subversive World of New Zealand Playground Rhymes" (Journal of Folklore Research 44 [2-3], 2007), Janice Ackerley records a variant in which it is specifically imagined as a viper, the third and fourth lines being "I shot it with a sniper [sic] / 'Cos I thought it was a viper". (This is also the only variant I am aware of in which the respondent to the act of pride appears in the first person.)
In addition to the five sources mentioned above, other published references to the rhyme appear in Martyn Hammersley and Peter Woods, ed., Gender and Ethnicity in Schools: Ethnographic Accounts (1993); Iona Opie, The Singing Game (1998); Eve Bearne and Victor Watson, Where Texts and Children's Meet (1999); Catherine Fox, Love for the Lost (2015); and Anthony McGowan, The Art of Failing: Notes from the Underdog (2017).