code: public function restartSession($date = false)
      {
          $surviving_cookies = array();
          for ($i = 0; $i < count($this->cookies); $i++) {
              if (! $this->cookies[$i]->getValue()) {
                  continue;
              }
              if (! $this->cookies[$i]->getExpiry()) {
                  continue;
              }
              if ($date && $this->cookies[$i]->isExpired($date)) {
                  continue;
              }
              $surviving_cookies[] = $this->cookies[$i];
          }
          $this->cookies = $surviving_cookies;
      }
docs: Removes expired and temporary cookies as if the browser was closed and re-opened.
  
  @param string/integer $date Time to test expiry against.