|  | Posted by jerrygarciuh on 01/18/08 18:45 
On Jan 18, 12:13 pm, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:> On Fri, 18 Jan 2008 18:57:19 +0100, jerrygarciuh <jerrygarc...@gmail.com>
 > wrote:
 >
 > > I discovered this by accident today.  How should I get an object's
 > > data into another variable and make modifications without affecting
 > > the original object?
 >
 > Since PHP5, objects are always passed (& assigned) by reference. Use the
 > 'clone' keyword if you need a clone, and you can even use the magic
 > __clone() method to alter an object on clone (possibly clone objects in
 > the properties too etc.).
 > --
 > Rik Wasmus
 Thanks Rik!
 
 JG
  Navigation: [Reply to this message] |