PHP类知识----clone方法上机实验
<?php
class mycoach
{
public function __construct($name,$age)
{
$this->name = $name;
$this->age = $age;
}
}
$cpc = new mycoach("陈培昌",22);
$cj = $cpc;
var_dump($cj,$cpc);
$cj2 = clone $cpc;
var_dump($cj2,$cpc);
?>