If at least one OR operand is true, there is no need to go further and check other operands, and all this will be evaluated as true.
(a || b || c || d || e || ...) will be TRUE if at least one of the operands is true, therefore, as soon as I find one operand is true, I do not need to check the following operands.
This logic applies everywhere, PHP, JAVA, C ...
source share