type * @param string $value Initialization value for $this->value */ public function __construct() { if (2 == func_num_args()) { $this->type = func_get_arg(0); $this->value = func_get_arg(1); } } /** * Encode this object to JSON */ #[\ReturnTypeWillChange] public function jsonSerialize() { $json = array(); $json['type'] = $this->type; $json['value'] = utf8_encode($this->value); return $json; } }