其实接触深复制浅复制是通过学习c++了解到的,比如c++很好用的模板,php是不允许方法模板和类模板 一个简单的例子,如果不是很了解php 的取地址符&,可以去看下官方文档,php的&就是别名 class zx{ public $r ='44444444<br>'; public function __construct() { } public function ccccc() { echo $this->r; } } $rr = new zx(); //$ee = $…
参考 https://docs.python.org/3/library/copy.html?highlight=copy%20copy#copy.copy https://en.wikipedia.org/wiki/Object_copying#Shallow_copy Fluent Python第四部分第8章 A shallow copy constructs a new compound object and then (to the extent possible) inserts re…