【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“code3.4.php”一文,供大家参考学习
<?php
class Automotive
{
public $speed;
public $type;
function Driving()
{
printf("%1\$s的速度是%2\$s",$this->type,$this->speed);
}
}
$a = new Automotive();
$a->speed = "100千米/小时";
$a->type = "公共汽车";
$a->Driving();
?>