Blogger Information
Blog 10
fans 0
comment 1
visits 8256
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
类的CLONE
夏涛的博客
Original
791 people have browsed it
<?php 
class demo{
    public $name='xiatao';    
}
$A = new demo();
$B=$A;
$C=clone $A;
$D=new demo();
$A->name='caibaihua';
echo '对象引用:'.$A->name.'--'.$B->name;
echo '<hr>';
echo '克隆引用:'.$A->name.'--'.$C->name;
echo '<hr>';
echo '创建对象:'.$A->name.'--'.$D->name;
echo '<hr>';
echo '克隆对象的类是:'.get_class($C);
 ?>


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
  • 1970-01-01 08:00:00