【php开源代码栏目提醒】:网学会员--在 php开源代码编辑为广大网友搜集整理了:code3.3.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();
?>