diff --git a/reference/network/functions/setcookie.xml b/reference/network/functions/setcookie.xml
index 3e563e5278c3..75ecb171a7a9 100644
--- a/reference/network/functions/setcookie.xml
+++ b/reference/network/functions/setcookie.xml
@@ -158,8 +158,9 @@
An associative array which may have any of the keys
expires, path, domain,
secure, httponly and samesite.
- If any other key is present an error of level E_WARNING
- is generated. The values have the same meaning as described for the
+
+
+ The values have the same meaning as described for the
parameters with the same name. The value of the samesite
element should be either None, Lax
or Strict.
@@ -168,6 +169,7 @@
samesite element is omitted, no SameSite cookie
attribute is set.
+
To set a cookie that includes attributes that aren't among the keys listed,
@@ -197,6 +199,25 @@
+
+ &reftitle.errors;
+
+ If the options array contains unsupported keys:
+
+
+
+
+ Prior to PHP 8.0.0, an E_WARNING was generated.
+
+
+
+
+ As of PHP 8.0.0, a ValueError is thrown.
+
+
+
+
+
&reftitle.changelog;
@@ -223,6 +244,14 @@
SameSite cookie attribute.
+
+ 8.0.0
+
+ Passing unsupported keys now throws a ValueError
+ instead of emitting an E_WARNING.
+
+
+