示例#1
0
文件: classtest.php 项目: shiyake/PHP
* 
*/
class a
{
    public $b;
    public $c;
    function v()
    {
        echo "first";
    }
    function __construct($b, $c)
    {
        $this->b = $b;
        $this->c = $c;
    }
    function __destruct()
    {
        echo "destruction";
    }
}
$car = new automobile();
$d = new a(1, 2);
$car->model = "BMW";
$car->owner = "xieyang";
$car->start();
for ($i = 0; $i < 10; $i++) {
}
$car->red();
echo $car->owner . "的" . $car->model . "行驶了" . $car->time . "s<br>";
$d->v();