code: public static function sleep($class, array $excludedProperties = [])
      {
          $propertyNames = [];
          $refl = new \ReflectionClass($class);
          foreach ($refl->getProperties() as $property) {
              if (\in_array($property->getName(), $excludedProperties, true)) {
                  continue;
              }
              $propertyNames[] = $property->getName();
          }
  
          return $propertyNames;
      }
docs: @param string $class
  @param array  $excludedProperties
  
  @return array