<<< Previous question <<< Question ID#0666.md >>> Next question >>>
When checking to see if two variables contain the same instance of an object, which of the following comparisons should be used?
- A) if($obj1 instanceof $obj2)
- B) if($obj1->equals($obj && ($obj1 instanceof $obj2))
- C) if($obj1->equals($obj2))
- D) if($obj1 === $obj2)
Answer
Answer: A