以下是一个简单的PHP对象实例,我们将创建一个名为`Car`的类,然后创建这个类的两个实例。
```php

// 定义Car类
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 "







