So I am porting a VBA application to PHP and ran into this wonderful little nugget of code:
expr1 = expr2 Mod expr3 = 0
I thought it was behaving like a ternary operator but when I broke it down to simple if then statements the outcome was not as expected. So I ask the brilliant stackoverflow community to help me out and put it in easy to understand terms. I know by looking at the other answers I will not be let down. [/end brown_nose>]
It is the modulus operator:
in PHP it is the % sign:
see php documentation here
So the line
means: expr1 is true, if expr2 can be divided by expr3 without any remainders:
eg: