3v4l.org

run code in 500+ PHP versions simultaneously
<?php $params = [ "samesite" => "Lax", "expires_or_options" => time() + 3600, "path" => "/", "domain" => "", "secure" => false, "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", ...$params);
Output for rfc.property-hooks, git.master, git.master_jit
array(8) { ["name"]=> string(8) "testName" ["value"]=> string(9) "testValue" ["expires_or_options"]=> int(1787048836) ["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:
56.08 ms | 2827 KiB | 4 Q