Mon Oct 27, 2008 5:51 pm
Operation Operator Example Expansion
Assignment = $a = 5 $a = 5
Addition += $a += 5 $a = $a + 5
Subtraction -= $a -= 5 $a = $a - 5
Multiplication *= $a *= 5 $a = $a * 5
Division /= $a /= 5 $a = $a / 5
Concatenation .= $a .= "Add" $a = $a . "Add"
Modulus %= $a %= 5 $a = $a % 5
Bitwise AND &= $a &= 5 $a = $a & 5
Bitwise |= $a |= 5 $a = $a | 5
inclusive OR
Bitwise ^= $a ^= 5 $a = $a ^ 5
exclusive OR (XOR)
Bitwise NOT ~= $a ~= 5 $a = $a ~ 5
Bitwise <<= $a <<= 5 $a = $a << 5
left-shift
Bitwise >>= $a >>= 5 $a = $a >> 5
right-shift
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.