You are here: Re: if else VS switch « PHP Programming Language « IT news, forums, messages
Re: if else VS switch

Posted by Good Man on 11/21/23 11:46

Don <NOSPAMdon.h@free.fr> wrote in news:44561ee5$0$14027
$626a54ce@news.free.fr:

> Hi,
>
> The behavior between if else and switch is not different in PHP.
> However is there difference for the performance (I know in C it's
> different) while interpreting the script?
>
> Thanks in advance

if i recall correctly, one of the bugfixes/improvements to the
latest/greatest PHP version was improving the speed of switch statements...
so I assume they are as fast as if/else at least right now...

obviously the real benefit of using 'switch' is that its great for going
through many possible conditions, and results in far more readable code.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация