Welcome to the wonderful world of references, copies and clones in php.
Your email has chivvied me into action and I've tried to describe what
is going on, partly for my own reference in the future as this has
bitten me recently with a project I've been working on. See
http://sportsdaft.blogspot.com/2008/04/by-reference-vs-by-value-in-php.h
tml for some detail. I reserve the right to be completely wrong though
so check anything I say out before taking it as fact.
This guy (http://mjtsai.com/blog/2004/07/15/php-5-object-references/)
also provides some good info and the discussion at the foot of his blog
entry has some interesting and useful comments.
Later,
Andy
-------------
Yada, yada, yada...
Roslin Institute is a company limited by guarantee, registered in
Scotland (registered number SC157100) and a Scottish Charity (registered
number SC023592). Our registered office is at Roslin, Midlothian, EH25
9PS. VAT registration number 847380013.
The information contained in this e-mail (including any attachments) is
confidential and is intended for the use of the addressee only. The
opinions expressed within this e-mail (including any attachments) are
the opinions of the sender and do not necessarily constitute those of
Roslin Institute (Edinburgh) ("the Institute") unless specifically
stated by a sender who is duly authorised to do so on behalf of the
Institute.