Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 483 Bytes

0666.md

File metadata and controls

18 lines (12 loc) · 483 Bytes

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