Possibly some other term may be in use for this particular verbal ploy, but for the purpose of this article I define a homophone as a word, phrase, sentence or passage in general whose sound is such that it may be written down and interpreted as regards meaning two distinct ways. There is an obvious overlapping here with homonyms and charades, but the former term is really suitable for single words only, while the latter is certainly applied (see, for example, Dmitri Borgmann's Language on Vacation, p. 112) to passages having the same sequence of letters differently grouped, irrespective of pronunciation.
Lindon, J. A.
Word Ways: Vol. 2
, Article 8.
Available at: https://digitalcommons.butler.edu/wordways/vol2/iss3/8