Re: [PHP] ZCE question - duplicate object

2009-08-12 Thread Sudheer Satyanarayana
Augusto Flavio wrote: HI everyone, i'm studying for the zce exam and i found a blog that try to answer some questions covered in the exam. I found one that i do not agree. Question: What is wrong with the following code? function duplicate($obj) { $newObj = $obj; return $newObj; } $a = new

[PHP] ZCE question - duplicate object

2009-08-12 Thread Augusto Flavio
HI everyone, i'm studying for the zce exam and i found a blog that try to answer some questions covered in the exam. I found one that i do not agree. Question: What is wrong with the following code? function duplicate($obj) { $newObj = $obj; return $newObj; } $a = new MyClass(); $a_copy = du