Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions reference/network/functions/setcookie.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,24 @@
An associative <type>array</type> which may have any of the keys
<literal>expires</literal>, <literal>path</literal>, <literal>domain</literal>,
<literal>secure</literal>, <literal>httponly</literal> and <literal>samesite</literal>.
If any other key is present an error of level <constant>E_WARNING</constant>
is generated. The values have the same meaning as described for the
</simpara>
<simpara>
If any other key is present:
</simpara>
<itemizedlist>
<listitem>
<simpara>
Prior to PHP 8.0.0, an <constant>E_WARNING</constant> was generated.
</simpara>
</listitem>
<listitem>
<simpara>
As of PHP 8.0.0, a <classname>ValueError</classname> is thrown.
</simpara>
</listitem>
</itemizedlist>
<simpara>
The values have the same meaning as described for the
parameters with the same name. The value of the <literal>samesite</literal>
element should be either <literal>None</literal>, <literal>Lax</literal>
or <literal>Strict</literal>.
Expand All @@ -168,6 +184,7 @@
<literal>samesite</literal> element is omitted, no SameSite cookie
attribute is set.
</simpara>

<note>
<simpara>
To set a cookie that includes attributes that aren't among the keys listed,
Expand Down