code: public function serialize($value): string
      {
          //TODO: maybe only serialize non-scalar values?
          return $this->base64 ? base64_encode(serialize($value)) : serialize($value);
      }
docs: @param mixed $value
  
  @return string