It is originally done through $obj2 = $obj, so it should be equal. If you want to determine whether it is a reference to the current object, shouldn't you use $obj2 = new Demo(); and then determine whether it is equal?
半夏浅沫微凉2019-10-14 11:02:59
$obj2=new Demo(); There is no difference between $obj2 =$obj;. $obj = new Demo(); has been instantiated above. You just wrote one more line of code