class Dog{ public $leg = 12; public $wei = 2; } $dog = new Dog; $d2 = $dog; $d2 ->leg = 5; echo $dog->leg,'~~'$d2->leg;
class Dog{
public $leg = 12;
public $wei = 2;
}
$dog = new Dog;
$d2 = $dog;
$d2 ->leg = 5;
echo $dog->leg,'~~'$d2->leg;
最后打印出来的结果
5~5
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
|Archiver|手机版|小黑屋|宜信同城网交流论坛 ( 闽ICP备19021048号 )|站点地图
GMT+8, 2026-3-28 03:15 , Processed in 0.243268 second(s), 14 queries , Redis On.
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.