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