My answer is below, but, surprisingly enough, only a couple of days later, I found it expedient to use a GOTO in a PHP script, admittedly to fix a logic problem that wasn’t very well thought out. In a while() loop, a test at the end needed to start a new output section, but the current data set needed to be put in the new section. The expediency was to use the initialization code to start the new section, which was at the top of the loop, but allowing the loop to cycle would read a new data set, so the “quick-and-dirty” solution was to jump to the top of the loop without reading the new value. Problem solved, and preserved the integrity of the code block, which was the main problem with GOTO in unstructured programs, back in 1968 when Edsgar Dykstra gave his infamous “GOTO Considered Harmful” proclamation.
GOTO Considered [Rarely] Necessary
I’ve been contributing to Quora.com lately, answering various computer-related questions on programming and Linux in particular. Here’s one that came up at the end of January: