miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Master Class miniBB Support Forums / Master Class /   

Switch instead of ElseIf ?..

Author OZtwo
#1 | Posted: 20 Feb 2003 21:32 
What is it with your over use of ElseIf and not Switch anyway??? :)

Author Team
#2 | Posted: 21 Feb 2003 10:29 
Because elseif is MUCH FASTER than Switch.

Author OZtwo
#3 | Posted: 21 Feb 2003 11:04 
Any really good sites to readup on php performance? I would have guessed switch with the use of break would be faster. But with me being so new to php of course I'm wrong. :) But I have to say, I do love this application and the way you did program it. Very well done!!

Author 4days
#4 | Posted: 21 Feb 2003 14:37 
checking out all the user posts in the english documentation on is good - pretty much every function has a post from someone saying what it's faster or slower than. has some decent articles too.

Author terex
#5 | Posted: 16 Mar 2004 02:34 
Ofcause Php is not compier, but switch{} is more quickly in any case, isn't it?
sorry for my russian english

Author Team
#6 | Posted: 16 Mar 2004 10:19 
Exactly vice versa - it is much slower.

Author terex
#7 | Posted: 16 Mar 2004 22:39 
Hm. It's very interesting why. So interesting that i'll go see source code of php.

Author Team
#8 | Posted: 17 Mar 2004 10:48 

Ctrl+F and search for the word "slower"

This is just one example... I have lost a complicated test which proofs that.

I guess, in case of miniBB with very simple comparisions the speed difference between "switch" and "if" is not really critical. We are using "if" just because it is more suitable.

Author terex
#9 | Posted: 17 Mar 2004 13:33 
Ok, thanks 8)

Master Class miniBB Support Forums / Master Class / Switch instead of ElseIf ?.. Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB