I'm creating a sample legacy project for my workshop. I'm trying to include as many of the common mistakes. 50 lines in, and I already feel as dirty as a 18th century coal miner. I've seen too much.
@afilina GOTO! Use GOTO!!!!! HAHAHA

@airtonzanon Haha, that would be fun. However, I haven't seen it in the last 10 million lines of legacy, so not even sure how to create a plausible misuse scenario. I have plenty on my list already :)

See the comic at the top of the docs here: https://www.php.net/manual/en/control-structures.goto.php

PHP: goto - Manual

PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

@afilina Indeed, I think I never saw this running in production.
But I already created a PR as a joke to see people's eyes bleeding hahahaha.

OMG. I think I never have accessed this docs, absolutely amazing!

@afilina @airtonzanon I recently saw a go-to in a bad indented code that looked like it was at a certain line when in fact it was conditionned by a if statement with brackets. If you need inspiration ;)
@afilina @airtonzanon I have used goto in production, but not since the introduction of the ‘finally’ keyword. It was good for performing end-of-function cleanup.