headers->setCookie(new Cookie('Hello + world', 'hodor')); } catch (\InvalidArgumentException $e) { echo $e->getMessage(); }