Object Reference vs. Copy in PHP5

While working on the recurring task code tonight I ran into the ‘Oh, now PHP5 just passes a reference to an object instead of creating a copy of it’ situation a number of people have already lamented. Changing the default behavior is one thing, changing it without a solution in place to work with the previous behavior kinda stinks.

This solution is quite a hack but seems to work ok.