setrawcookie example

<?php
use Symfony\Component\HttpFoundation\Cookie;

$r = require __DIR__.'/common.inc';

$str = '?*():@&+$/%#[]';

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

setrawcookie($str$str, 0, '/', '', false, false);


    /** * Extracted call to `setrawcookie()` in order to run unit tests on it. * * @codeCoverageIgnore * * @deprecated */
    protected function setRawCookie(string $name, string $value, array $options): void
    {
        setrawcookie($name$value$options);
    }

    /** * Extracted call to `setcookie()` in order to run unit tests on it. * * @codeCoverageIgnore * * @deprecated */
    protected function setCookie(string $name, string $value, array $options): void
    {
        
$this->cookieStore->clear();
    }

    /** * Extracted call to `setrawcookie()` in order to run unit tests on it. * * @codeCoverageIgnore */
    private function doSetRawCookie(string $name, string $value, array $options): void
    {
        setrawcookie($name$value$options);
    }

    /** * Extracted call to `setcookie()` in order to run unit tests on it. * * @codeCoverageIgnore */
    private function doSetCookie(string $name, string $value, array $options): void
    {
        setcookie($name$value$options);
    }

    
Home | Imprint | This part of the site doesn't use cookies.