There are often many ways that lead to Rome, and that’s also the case for PHP. Not every way is fast though. Ever wondered if elseif would be faster than else if? Or whether to use a switch or an if statement? Well fortunately there is a benchmark comparing all those possibilities for you with some pretty interesting results.
You can find the php function benchmark here: http://net-beta.net/ubench/
