PHP MCQ Object Oriented Concept of PHP Question #2584
Single Choice Not Set

QWhich one of the following is the right way to clone an object?

ID: #2584 Object Oriented Concept of PHP 1,938 views
Question Info
#2584Q ID
Not SetDifficulty
Object Oriented Concept of PHPTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A _clone(targetObject);
  • B destinationObject = clone targetObject;
  • C destinationObject = _clone(targetObject);
  • D destinationObject = clone(targetObject);
Correct Answer

Explanation

You can clone an object by prefacing it with the clone keyword.

Share This Question

Challenge a friend or share with your study group.