Bradshaw Code on X: "If vs switch statement performance with 1 million iterations in a loop. As the number of blocks/cases increases the more important it becomes to use a switch instead
php - Which is Faster and better, Switch Case or if else if? - Stack Overflow