菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码
运行
保存
color = $color; } function what_color() { return $this->color; } } function print_vars($obj) { foreach (get_object_vars($obj) as $prop => $val) { echo "t$prop = $val "; } } // 实例一个对象 $herbie = new Car("white"); // 显示 herbie 属性 echo "therbie:Properties "; print_vars($herbie); ?>
运行结果