content = (string) $content; $this->charset = $charset; } public function __toString() { return $this->content; } #[\ReturnTypeWillChange] public function count() { return \mb_strlen($this->content, $this->charset); } #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->content; } }