I am talking about it, but this is still a mentally retarded issue. can you refer to Haha... $ anewclass (); $ B $ a; 1)? is $ B getting a copy of $ a or a reference? 2) if $ B references $ a, why does $ B still exist after $ anull? Can it be understood that $ a's copy is assigned to $ b3? if $ B & amp; $ a is written in this way, the result is totally different: $ anull, $ B old-fashioned discussion, this is still a mentally retarded problem. let's take a look at it ..
$ A = new class ();
$ B = $;
1) is $ B a copy of $ a or a reference?
2) if $ B references $ a, why does $ B still exist after $ a = null? Can it be understood that the copy of $ a is assigned to $ B?
3) if $ B = & $ a is written as above, the result is completely different: $ a = null, $ B is also null.
------ Solution --------------------
$ B = $
B is a copy of.
$ B = new class ();
In addition, the variable name is referenced, but the accessed content is the same. the memory address points to the same place. This does not need to be explained.