mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
Closes GH-1209: Named argument in setcookie function called $expires instead of $expires_or_options
This commit is contained in:
parent
ac6b36357e
commit
d829c7d11f
2 changed files with 7 additions and 7 deletions
|
@ -12,13 +12,13 @@
|
|||
<type>bool</type><methodname>setcookie</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter><initializer>""</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>expires</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>expires_or_options</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>path</parameter><initializer>""</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>domain</parameter><initializer>""</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>secure</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>httponly</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Alternative signature available as of PHP 7.3.0:</para>
|
||||
<para>Alternative signature available as of PHP 7.3.0 (not supported with named parameters):</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>setcookie</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
|
@ -68,7 +68,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expires</parameter></term>
|
||||
<term><parameter>expires_or_options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The time the cookie expires. This is a Unix timestamp so is
|
||||
|
@ -83,7 +83,7 @@
|
|||
<para>
|
||||
<note>
|
||||
<para>
|
||||
You may notice the <parameter>expires</parameter> parameter takes on a
|
||||
You may notice the <parameter>expires_or_options</parameter> parameter takes on a
|
||||
Unix timestamp, as opposed to the date format <literal>Wdy, DD-Mon-YYYY
|
||||
HH:MM:SS GMT</literal>, this is because PHP does this conversion
|
||||
internally.
|
||||
|
@ -342,7 +342,7 @@ one : cookieone
|
|||
Cookies will not become visible until the next loading of a page that
|
||||
the cookie should be visible for. To test if a cookie was successfully
|
||||
set, check for the cookie on a next loading page before the cookie
|
||||
expires. Expire time is set via the <parameter>expires</parameter>
|
||||
expires. Expire time is set via the <parameter>expires_or_options</parameter>
|
||||
parameter. A nice way to debug the existence of cookies is by
|
||||
simply calling <literal>print_r($_COOKIE);</literal>.
|
||||
</simpara>
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
<type>bool</type><methodname>setrawcookie</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>expires</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>expires_or_options</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>secure</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>httponly</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Alternative signature available as of PHP 7.3.0:</para>
|
||||
<para>Alternative signature available as of PHP 7.3.0 (not supported with named parameters):</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>setrawcookie</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
|
|
Loading…
Reference in a new issue