If statements

    Date: 07/09/05 (PHP Community)    Keywords: php

    I know that some things are faster in PHP then others, like echo and print for example off my head. As every like is like that of course. Though there is also bit functionality different from them too but, factor of common use of them is the same. Anyhow, if's are pretty much based on freedom choice, meaning there is so much you can do with them and I want to know which is most fastest by server.

    1.
    if(statement)
    {
       code;
    }
    else
    {
       code;
    }
    
    2.
    if(statement) code;
    else code;
    
    3.
    if(statement):
       code;
    else:
       code;
    endif;
    
    4.
    (statement) ? code : code;

    So...the fastest would be?

    Source: http://www.livejournal.com/community/php/316577.html

« PHP_SELF versus SCRIPT_NAME || Firefox Adblock Filter... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home