Generally speaking, you could write the first choice, but it could cause problems on many web servers, but if you use the second code, it will work fine on all web servers, without the need to manually alter PHP configuration. I think that the second way is the safest way to use Switch command, and that structure of code is much better than the first one for many reasons.
Enjoy.
|