class Person { private $name = 'John'; public $age = 30; } $nameProp = new ReflectionProperty('Person', 'name'); $isPrivate = $nameProp->isPrivate(); echo $isPrivate; // Output: 1 $ageProp = new ReflectionProperty('Person', 'age'); $isPrivate = $ageProp->isPrivate(); echo $isPrivate; // Output: 0In this example, we have a `Person` class with two properties: `$name` and `$age`. We create `ReflectionProperty` objects for each property and use the `isPrivate()` method to determine their accessibility. The output shows that `$name` is private and `$age` is public. The `ReflectionProperty` class is part of the PHP Reflection package.