3v4l.org

run code in 500+ PHP versions simultaneously
<?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());
Output for git.master, git.master_jit
array(8) { ["name"]=> string(8) "testName" ["value"]=> string(9) "testValue" ["expires_or_options"]=> int(1787059013) ["path"]=> string(1) "/" ["domain"]=> string(0) "" ["secure"]=> bool(false) ["httponly"]=> bool(true) ["samesite"]=> string(3) "Lax" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.53 ms | 792 KiB | 4 Q