I've been looking through a few mock exams and study guides for PHP and I came across this example:
$a = array(1, 2, 3);
foreach ($a as $x)
$x *= 2;
echo $a[0] * $a[1] * $a[2];
This returns 6
.
My question is: what exactly does the *=
operator mean?