[dev] [cvs] commit: framework/MIME/MIME Contents.php

Jan Schneider jan at horde.org
Sat May 28 02:36:04 PDT 2005


Zitat von Michael M Slusarz <slusarz at curecanti.org>:

> slusarz     2005-05-27 22:56:31 PDT
>
>  Modified files:
>    MIME/MIME            Contents.php
>  Log:
>  Bug: 1410
>  It turns out that PHP 5's clone() doesn't seem to work the way I 
> expect it to.
>  Namely, the outermost part of the object is cloned but inner 
> variables in the
>  object may remain linked outside of the cloned object.  To me, clone 
> means to
>  create a new copy of the object that is completely independent of the old
>  object.  Seems like the PHP folk agree with me since there are multiple bugs
>  on this issue - See, e.g.:

That was news to me too. But that's exactly the reason why other 
languages have the concept of "deep cloning" which does exactly what 
you describe and what I would expect from PHP being a "simple" language.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list