In this exemple, if the first conditions is matched, are the other one tested by the compilator ?
a = 10
if (a % 2 == 0 || a / 2 == 5 || a == 10)
echo 'hello world'
In this exemple, if the first conditions is matched, are the other one tested by the compilator ?
a = 10
if (a % 2 == 0 || a / 2 == 5 || a == 10)
echo 'hello world'
In logical or conditions are checked from left to right.
If the left condition is true then remaining right conditions are not checked by the compiler.
bool condition_1 = true;
bool condition_2 = false;
if(condition_1 || condition_2) in this case condition_2 is not checked by compiler.