<?php class CookieType { public string $samesite = "Lax"; public int $expires_or_options { get { return time() + 3600; } } public string $path = "/"; public string $domain = ""; public bool $secure = false; public bool $httponly = true; } function fakeSetCookie( string $name, string $value = "", int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false, string $samesite = "Strict", ) { var_dump([ "name" => $name, "value" => $value, "expires_or_options" => $expires_or_options, "path" => $path, "domain" => $domain, "secure" => $secure, "httponly" => $httponly, "samesite" => $samesite, ]); } fakeSetCookie("testName", "testValue", ...new CookieType());
You have javascript disabled. You will not be able to edit any code.