public function existsProtectedProperty($object, $property) { $reflection = new ReflectionClass($object); return $reflection->hasProperty($property); }