stringC = $string; $this->intC = $int; $this->boolC = $bool; } public function Serialize (): string { $array = []; $array["string"] = $this->stringC; $array["int"] = $this->intC; $array["bool"] = $this->boolC; return json_encode($array); } public function UnSerialize (string $serialized): void { $array = json_decode($serialized, true); $this->stringC = $array["string"]; $this->intC = $array["int"]; $this->boolC = $array["bool"]; } }