I know that there is 2 ways to add command with: PHP: if(strtolower($command->getName()) === "cmd"){} and PHP: switch($command->getName()){ case "cmd":} What's better?
If you are doing one command it doesn't matter. Both are roughly the same. If you are matching several commands, the second one looks slightly better.
I think the second one is easier to handle multiple whole commands (like /defgm or /time), and to be able to function both at once. Doesn't exactly matter for one command.
http://stackoverflow.com/questions/3399755/if-versus-switch About the premature optimization thing, I am paranoid at it. I believe that everything should be optimized since you don't know whether it will get called million times per second one day.
In a commercial setting you don't do premature optimization. A lot of times is cheaper to buy bigger hardware to solve performance problems than pay for a programmer to optimize code.