code: public function onStart(Event $event)
      {
          $obj = $event->getSubject();
          if ($obj instanceof \DateTime || $obj instanceof \DateTimeImmutable) {
              $event['stringified'] = $obj->format(\DateTime::ISO8601);
          } elseif ($obj instanceof \mysqli && ($obj->connect_errno || !$obj->stat)) {
              // avoid "Property access is not allowed yet"
              $event['collectPropertyValues'] = false;
          }
      }
docs: debug.objAbstractStart event subscriber
  
  @param Event $event event object
  
  @return void