<?php
class car{
var $mada;
var $fangxiangpan;
var $shache;
function __construct ($mada,$fangxiangpan,$shache)
{
this->$mada;
this->$fangxiangpan;
this->$shache;
}
function much()
{
echo "我的汽车组成:".$this->mada."宝马:".$this->fangxiangpan."要:".$this->shache."<br>";
//通过构造方法创建三个对象$car1、car2、$car3,分别传入三个不同的实参 马达 方向盘 刹车
$car1=new car("黄金","宝马","紧急刹车");