lundi 29 juin 2015

if statement with multiple or condition

Consider the following code

if (  stripos($a,'something1')===0 || stripos($a,'something2')===0  ) {
        return '';
}

Is there a performance benefit for using in_array or does php stops testing if first condition evaluate to true ?

Aucun commentaire:

Enregistrer un commentaire