De traductores profesionales, empresas, páginas web y repositorios de traducción de libre uso.
l 'instruction if est une des plus importantes instructions de tous les langages, php inclus.
the if construct is one of the most important features of many languages, php included. it allows for conditional execution of code fragments. php의 if 문은 c와 비슷하다.:
ces expressions sont utilisées de manière courante dans les instructions conditionnelles, comme l 'instruction if.
the last example of expressions we'll deal with here is combined operator-assignment expressions. you already know that if you want to increment $a by 1, you can simply write '$a++' or '++$a'. but what if you want to add more than one to it, for instance 3? you could write '$a++' multiple times, but this is obviously not a very efficient or comfortable way. a much more common practice is to write '$a = $a + 3'. '$a + 3' evaluates to the value of $a plus 3, and is assigned back into $a, which results in incrementing $a by 3. in php, as in several other languages like c, you can write this in a shorter way, which with time would become clearer and quicker to understand as well. adding 3 to the current value of $a can be written '$a += 3'. this means exactly "take the value of $a, add 3 to it, and assign it back into $a". in addition to being shorter and clearer, this also results in faster execution. the value of '$a += 3', like the value of a regular assignment, is the assigned value. notice that it is not 3, but the combined value of $a plus 3 (this is the value that's assigned into $a). any two-place operator can be used in this operator-assignment mode, for example '$a -= 5' (subtract 5 from the value of $a), '$b *= 7' (multiply the value of $b by 7), etc.
cela n'est pas vraiment très utile, à moins que vous souhaitiez terminer votre boucle par l 'instruction conditionnelle break.
각 평가식은 비워둘 수 있다. expr2 가 비어있으면 무한 루프를 뜻한다. (php는 c와 같이 비어있으면 true 로 인식한다.) 이건 별로 좋은 방법이 아니지만, 종종 이렇게 사용하고 break 를 사용하여 종료하는 방법도 있다.
si l'expression expr est true, php exécutera l'instruction et si elle est false, l 'instruction sera ignorée.
as described in the section about expressions, expr is evaluated to its truth value. if expr evaluates to true, php will execute statement, and if it evaluates to false - it'll ignore it.