in reply to Scoping Problem

--$year actually decrements the variable $year outside the block, because the right side is evaluated first, before the local copy is created. It doesn't simply return the value 1 less than year and assign it to the local variable year.