code: public function remove(string $key)
      {
          if ($this->contains($key)) {
              $res = $_SESSION[$key];
              unset($_SESSION[$key]);
              return $res;
          } else {
              return null;
          }
      }
docs: It removes the variable of session by passed key.
  @param string $key
  @return mixed|null The removed variable value.