What is += used for?
It's adding all those values to time.
something += somethingelse
is a shortcut for
something = something + somethingelse
-Adam
$time += $diff['hours'];
is the same as saying
$time = $time + $diff['hours'];
a += 2;
is the equivalent of a = a + 2;
At one time with some languages (especially very old C compilers), the compiler produced better code with the first option. It sticks around now because it's a common idiom and people used to it think it's clearer.