以下是一个简单的PHP实例,用于演示如何创建一个实例对象,并使用表格形式展示其属性和方法。
```php

// 定义一个类
class Car {
// 属性
public $brand;
public $model;
public $year;
// 构造方法
public function __construct($brand, $model, $year) {
$this->brand = $brand;
$this->model = $model;
$this->year = $year;
}
// 方法
public function displayInfo() {
echo "









