以下是一个简单的PHP实例,展示了如何定义一个类,并在该类中分析属性。
```php

class Person {
public $name;
public $age;
public $gender;
public function __construct($name, $age, $gender) {
$this->name = $name;
$this->age = $age;
$this->gender = $gender;
}
public function displayInfo() {
echo "









