Vidyalelo
PHP · Q41

Object Oriented Concept

Programming · PHP · question 41

Q41

Which keyword must be added before first variable on the third line of the above question to make second and first as distinct objects in PHP 5?

A.
copy
B.
clone
Answer
C.
cut
D.
Can’t add any word to make them distinct

Answer: Option B

Solution

Answer: Option B
Solution:
Clone operates on an object instance, producing a by-value copy.