headers->setCookie(new Cookie($str, $str, 0, '', null, false, false)); $r->sendHeaders(); setcookie($str, $str, 0, '/');