Don't have to test the speed i can tell by the unnecessary $gettok in there and all the if's and no elseif (Witch are faster)