Contributions are ready for review
| From: | phpdoc at lists dot php dot net | Date: | Mon, 02 Nov 2015 13:00:03 +0000 |
| Subject: | Contributions are ready for review | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969385937@lists.php.net to get a copy of this message | ||
Hello PHP EN Documentation team,
There are contributions within the online editor queue for this language.
Please review, then commit or delete these patches.
Patches for review :
-----------------------
Modified: en/internals2/opcodes/cast.xml
By: Gennady Kovshenin on 2015-03-15 18:46:59
===================================================================
--- en/internals2/opcodes/cast.xml
+++ en/internals2/opcodes/cast.xml
@@ -8,7 +8,7 @@
<![CDATA[
<?php
/*
- * casts value1 as type value2 (?? Not certain about arguments ??)
+ * casts value1 as type value2 (type in extended_value)
* opcode number: 21
*/
echo (int)1;
@@ -39,7 +39,7 @@
<row>
<entry></entry><entry>1</entry>
<entry>ECHO</entry><entry></entry>
- <entry></entry><entry></entry>
+ <entry></entry><entry>1</entry>
<entry>~0</entry>
</row>
<row>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=60577
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=60577
------------------------------------------------------------------
Modified: en/language/predefined/closure/call.xml
By: mail@akirakoyasu.net on 2015-06-23 07:03:03
===================================================================
--- en/language/predefined/closure/call.xml
+++ en/language/predefined/closure/call.xml
@@ -1,41 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 337372 $ -->
+<!-- $Revision: 336860 $ -->
<refentry xml:id="closure.call" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Closure::call</refname>
- <refpurpose>Binds and calls the closure</refpurpose>
+ <refpurpose>Calls the closure with the given parameters and returns the result, with $this
bound to the given object $to</refpurpose>
</refnamediv>
<refsect1 role="description"><!-- {{{ -->
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier>
<type>mixed</type><methodname>Closure::call</methodname>
-
<methodparam><type>object</type><parameter>newthis</parameter></methodparam>
+ <modifier>public</modifier>
<type>Closure</type><methodname>Closure::call</methodname>
+
<methodparam><type>object</type><parameter>to</parameter></methodparam>
+ <methodparam
choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
- Temporarily binds the closure to <parameter>newthis</parameter>, and calls
- it with any given parameters.
+ Calls the closure with the given parameters and returns the result, with $this bound to the
given object
+ <parameter>to</parameter>
</para>
</refsect1><!-- }}} -->
<refsect1 role="parameters"><!-- {{{ -->
&reftitle.parameters;
<variablelist>
<varlistentry>
- <term><parameter>newthis</parameter></term>
+ <term><parameter>to</parameter></term>
<listitem>
<para>
- The <type>object</type> to bind the closure to for the duration of the
- call.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>...</parameter></term>
+ <term><parameter>args</parameter></term>
<listitem>
<para>
- Zero or more parameters, which will be given as parameters to the
- closure.
</para>
</listitem>
</varlistentry>
@@ -44,9 +41,29 @@
<refsect1 role="returnvalues"><!-- {{{ -->
&reftitle.returnvalues;
<para>
- Returns the return value of the closure.
</para>
</refsect1><!-- }}} -->
+ <refsect1 role="changelog"><!-- {{{ -->
+ &reftitle.changelog;
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>7.0.0</entry>
+ <entry>
+ Added Closure::call
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1><!-- }}} -->
<refsect1 role="examples">
&reftitle.examples;
<example>
@@ -54,34 +71,12 @@
<programlisting role="php">
<![CDATA[
<?php
-class Value {
- protected $value;
-
- public function __construct($value) {
- $this->value = $value;
- }
-
- public function getValue() {
- return $this->value;
- }
-}
-
-$three = new Value(3);
-$four = new Value(4);
-
-$closure = function ($delta) { var_dump($this->getValue() + $delta); };
-$closure->call($three, 4);
-$closure->call($four, 4);
-?>
+$foo = new StdClass;
+$foo->bar = 3;
+$foobar = function ($qux) { var_dump($this->bar + $qux); };
+$foobar->call($foo, 4); // prints int(7)
]]>
</programlisting>
- &example.outputs;
- <screen>
-<![CDATA[
-int(7)
-int(8)
-]]>
- </screen>
</example>
</refsect1>
</refentry>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=63267
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=63267
------------------------------------------------------------------
Modified: en/language/constants.xml
By: Christopher Pitt on 2015-07-28 18:02:53
===================================================================
--- en/language/constants.xml
+++ en/language/constants.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 337760 $ -->
+<!-- $Revision: 336809 $ -->
<chapter xml:id="language.constants" xmlns="http://docbook.org/ns/docbook">
<title>Constants</title>
@@ -57,6 +57,12 @@
For more information on scope, read the manual section on
<link linkend="language.variables.scope">variable scope</link>.
</simpara>
+
+ <simpara>
+ There are a number of useful
+ <link linkend="reserved.constants">predefined constants</link>
+ which provide environmental/runtime information.
+ </simpara>
<sect1 xml:id="language.constants.syntax">
<title>Syntax</title>
@@ -101,9 +107,7 @@
when this happens. See also the manual entry on why
<link linkend="language.types.array.foo-bar">$foo[bar]</link> is
wrong (unless you first <function>define</function>
- <literal>bar</literal> as a constant). This does not apply to <link
- linkend="language.namespaces.rules">(fully) qualified constants</link>,
- which will raise a fatal error if undefined. If you simply want to check if a
+ <literal>bar</literal> as a constant). If you simply want to check if a
constant is set, use the <function>defined</function> function.
</simpara>
<para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=63864
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=63864
------------------------------------------------------------------
Modified: en/reference/filesystem/functions/fopen.xml
By: on 2015-08-07 11:40:32
===================================================================
--- en/reference/filesystem/functions/fopen.xml
+++ en/reference/filesystem/functions/fopen.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 337389 $ -->
+<!-- $Revision: 337307 $ -->
<refentry xmlns="http://docbook.org/ns/docbook"
xml:id="function.fopen">
<refnamediv>
<refname>fopen</refname>
@@ -133,8 +133,7 @@
<entry>
Open for writing only; place the file pointer at the end of
the file. If the file does not exist, attempt to create it.
- In this mode, <function>fseek</function> only affects
- the reading position, writes are always appended.
+ In this mode, <function>fseek</function> has no effect, writes are always
appended.
</entry>
</row>
<row>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=63982
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=63982
------------------------------------------------------------------
Modified: en/appendices/migration70/changed-functions.xml
By: anonymous on 2015-08-27 04:01:53
===================================================================
--- en/appendices/migration70/changed-functions.xml
+++ en/appendices/migration70/changed-functions.xml
@@ -33,7 +33,7 @@
<listitem>
<simpara>
<function>mktime</function> and <function>gmmktime</function>
functions
- no longer accept <parameter>is_dst</parameter> parameter.
+ no longer accept <parameter>is_dst</parameter> parameter.
</simpara>
</listitem>
<listitem>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64448
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64448
------------------------------------------------------------------
Modified: en/reference/apache/functions/virtual.xml
By: anonymous on 2015-08-27 04:01:57
===================================================================
--- en/reference/apache/functions/virtual.xml
+++ en/reference/apache/functions/virtual.xml
@@ -80,8 +80,8 @@
<note>
<para>
This function may be used on PHP files. However, it is typically better
- to use <function>include</function> or <function>require</function> for
- PHP files.
+ to use <function>include</function> or <function>require</function> for
+ PHP files.
</para>
</note>
</refsect1>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64449
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64449
------------------------------------------------------------------
Modified: en/reference/iconv/functions/iconv.xml
By: anonymous on 2015-08-27 04:02:01
===================================================================
--- en/reference/iconv/functions/iconv.xml
+++ en/reference/iconv/functions/iconv.xml
@@ -47,7 +47,7 @@
characters. If you append the string <literal>//IGNORE</literal>,
characters that cannot be represented in the target charset are silently
discarded. Otherwise, <constant>E_NOTICE</constant> is generated and the
function
- will return &false;.
+ will return &false;.
</para>
</listitem>
</varlistentry>
@@ -85,9 +85,9 @@
<row>
<entry>5.4.0</entry>
<entry>
- Since this version, the function returns &false; on illegal characters,
- unless <literal>//IGNORE</literal> is specified in output charset.
- Before, it returned partial output string.
+ Since this version, the function returns &false; on illegal characters,
+ unless <literal>//IGNORE</literal> is specified in output charset.
+ Before, it returned partial output string.
</entry>
</row>
</tbody>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64450
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64450
------------------------------------------------------------------
Modified: en/reference/solr/solrdismaxquery/removequeryfield.xml
By: anonymous on 2015-08-27 04:02:05
===================================================================
--- en/reference/solr/solrdismaxquery/removequeryfield.xml
+++ en/reference/solr/solrdismaxquery/removequeryfield.xml
@@ -53,8 +53,8 @@
$dismaxQuery = new SolrDisMaxQuery('lucene');
$dismaxQuery
- ->addQueryField('first', 3)
- ->addQueryField('second', 0.2)
+ ->addQueryField('first', 3)
+ ->addQueryField('second', 0.2)
->addQueryField('cat');
echo $dismaxQuery . PHP_EOL;
// remove field 'second'
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64451
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64451
------------------------------------------------------------------
Modified: en/reference/solr/solrdismaxquery/removephrasefield.xml
By: anonymous on 2015-08-27 04:02:09
===================================================================
--- en/reference/solr/solrdismaxquery/removephrasefield.xml
+++ en/reference/solr/solrdismaxquery/removephrasefield.xml
@@ -50,8 +50,8 @@
$dismaxQuery = new SolrDisMaxQuery('lucene');
$dismaxQuery
->addPhraseField('first', 3, 1)
- ->addPhraseField('second', 4, 1)
- ->addPhraseField('cat', 55);
+ ->addPhraseField('second', 4, 1)
+ ->addPhraseField('cat', 55);
echo $dismaxQuery . PHP_EOL;
echo $dismaxQuery->removePhraseField('second');
?>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64452
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64452
------------------------------------------------------------------
Modified: en/reference/ldap/book.xml
By: anonymous on 2015-08-27 04:20:37
===================================================================
--- en/reference/ldap/book.xml
+++ en/reference/ldap/book.xml
@@ -77,6 +77,11 @@
<link xlink:href="&url.ldap.openldap;">OpenLDAP Project</link>
</para>
</listitem>
+ <listitem>
+ <para>
+ Internet Engineering Taskforce RFCs <link
xlink:href="&url.ietf.rfc;rfc4510">4510</link> through <link
xlink:href="&url.ietf.rfc;rfc4519">4519</link>.
+ </para>
+ </listitem>
</itemizedlist>
<para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64453
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64453
------------------------------------------------------------------
Modified: en/reference/ldap/functions/ldap-search.xml
By: anonymous on 2015-08-27 04:25:42
===================================================================
--- en/reference/ldap/functions/ldap-search.xml
+++ en/reference/ldap/functions/ldap-search.xml
@@ -68,7 +68,8 @@
<para>
The search filter can be simple or advanced, using boolean operators in
the format described in the LDAP documentation (see the <link
- xlink:href="&url.ldap.filters;">Netscape Directory SDK</link> for
full
+ xlink:href="&url.ldap.filters;">Netscape Directory SDK</link> or
+ <link xlink:href="&url.ietf.rfc;rfc4515">RFC4515</link> for full
information on filters).
</para>
</listitem>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64455
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64455
------------------------------------------------------------------
Modified: en/reference/curl/functions/curl-setopt.xml
By: François Bonzon on 2015-09-14 21:11:35
===================================================================
--- en/reference/curl/functions/curl-setopt.xml
+++ en/reference/curl/functions/curl-setopt.xml
@@ -1050,6 +1050,20 @@
</entry>
</row>
<row>
+ <entry
valign="top"><constant>CURLOPT_PRIVATE</constant></entry>
+ <entry valign="top">
+ Any data that should be associated with this cURL handle. This data
+ can subsequently be retrieved with the
+ <constant>CURLINFO_PRIVATE</constant> option of
+ <function>curl_getinfo</function>. cURL does nothing with this data.
+ When using a cURL multi handle, this private data is typically a
+ unique key to identify a standard cURL handle.
+ </entry>
+ <entry valign="top">
+ Added in cURL 7.10.3.
+ </entry>
+ </row>
+ <row>
<entry
valign="top"><constant>CURLOPT_PROXY</constant></entry>
<entry valign="top">
The HTTP proxy to tunnel requests through.
@@ -1520,6 +1534,12 @@
</entry>
</row>
<row>
+ <entry>5.2.4</entry>
+ <entry>
+ Introduced <constant>CURLOPT_PRIVATE</constant>.
+ </entry>
+ </row>
+ <row>
<entry>5.1.0</entry>
<entry>
Introduced <constant>CURLOPT_AUTOREFERER</constant>,
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64844
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64844
------------------------------------------------------------------
Modified: en/language-snippets.ent
By: anonymous on 2015-09-16 05:19:10
===================================================================
--- en/language-snippets.ent
+++ en/language-snippets.ent
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 338061 $ -->
+<!-- $Revision: 337779 $ -->
<!-- Keep 'em sorted -->
<!ENTITY changelog.randomseed '<row xmlns="http://docbook.org/ns/docbook"><entry>4.2.0</entry><entry>The
random
@@ -196,11 +196,6 @@
<emphasis>DEPRECATED</emphasis> as of PHP 5.6.0. Relying on this feature
is highly discouraged.</simpara></warning>'>
-<!ENTITY warn.deprecated.feature-7-0-0 '<warning
-xmlns="http://docbook.org/ns/docbook"><simpara>This
feature has been
-<emphasis>DEPRECATED</emphasis> as of PHP 7.0.0. Relying on this feature
-is highly discouraged.</simpara></warning>'>
-
<!ENTITY removed.php.future 'This deprecated feature <emphasis xmlns="http://docbook.org/ns/docbook">will</emphasis>
certainly be <emphasis xmlns="http://docbook.org/ns/docbook">removed</emphasis>
in the future.'>
@@ -1860,7 +1855,7 @@
<!ENTITY mongo.setwriteconcern.returnvalues '<para xmlns="http://docbook.org/ns/docbook">Returns
&true; on success, or &false; otherwise.</para>'>
<!ENTITY mongo.setwriteconcern.errors '<para xmlns="http://docbook.org/ns/docbook">Emits
<constant>E_WARNING</constant> if the <literal>w</literal> parameter is not
an integer or string value.</para>'>
<!ENTITY mongo.getwriteconcern.returnvalues '<para xmlns="http://docbook.org/ns/docbook">This function
returns an array describing the write concern. The array contains the values
<literal>w</literal> for an integer acknowledgement level or string mode, and
<literal>wtimeout</literal> denoting the maximum number of milliseconds to wait for the
server to satisfy the write concern.</para>'>
-<!ENTITY mongo.command.parameters.maxtimems '<listitem xmlns="http://docbook.org/ns/docbook"><para><literal>"maxTimeMS"</literal></para><para>Specifies
a cumulative time limit in milliseconds for processing the operation (does not include idle time).
If the operation is not completed within the timeout period, a
<classname>MongoExecutionTimeoutException</classname> will be
thrown.</para></listitem>'>
+<!ENTITY mongo.command.parameters.maxtimems '<listitem xmlns="http://docbook.org/ns/docbook"><para><literal>"maxTimeMS"</literal></para><para>Specifies
a cumulative time limit in milliseconds for processing the operation on the server (does not include
idle time). If the operation is not completed by the server within the timeout period, a
<classname>MongoExecutionTimeoutException</classname> will be
thrown.</para></listitem>'>
<!ENTITY mongo.index.parameters.background '<listitem xmlns="http://docbook.org/ns/docbook"><para><literal>"background"</literal></para><para>Builds
the index in the background so that building an index does <emphasis>not</emphasis>
block other database activities. Specify &true; to build in the background. The default value is
&false;.</para><warning xmlns="http://docbook.org/ns/docbook"><para>Prior
to MongoDB 2.6.0, index builds on secondaries were executed as foreground operations, irrespective
of this option. See <link xlink:href="&url.mongodb.dochub.indexes.rs;"
xmlns:xlink="http://www.w3.org/1999/xlink">Building Indexes
with Replica Sets</link> for more
information.</para></warning></listitem>'>
<!ENTITY mongo.index.parameters.dropdups '<listitem xmlns="http://docbook.org/ns/docbook"><para><literal>"dropDups"</literal></para><para>Specify
&true; to force creation of a unique index where the collection may contain duplicate values for
a key. MongoDB will index the first occurrence of a key and delete all subsequent documents from the
collection that contain a duplicate value for that key. The default value is
&false;.</para><warning xmlns="http://docbook.org/ns/docbook"><para><literal>"dropDups"</literal>
may delete data from your database. Use with extreme caution.</para></warning><note
xmlns="http://docbook.org/ns/docbook"><para>This
option is not supported on MongoDB 2.8+. Index creation will fail if the collection contains
duplicate values.</para></note></listitem>'>
<!ENTITY mongo.index.parameters.expireafterseconds '<listitem xmlns="http://docbook.org/ns/docbook"><para><literal>"expireAfterSeconds"</literal></para><para>The
value of this option should specify the number of seconds after which a document should be
considered expired and automatically removed from the collection. This option is only compatible
with single-field indexes where the field will contain <classname>MongoDate</classname>
values.</para><note xmlns="http://docbook.org/ns/docbook"><para>This
feature is available in MongoDB 2.2+. See <link
xlink:href="&url.mongodb.docs.expire_data;" xmlns:xlink="http://www.w3.org/1999/xlink">Expire Data from
Collections by Setting TTL</link> for more
information.</para></note></listitem>'>
@@ -1920,7 +1915,7 @@
'>
<!ENTITY mongodb.parameter.filter '
<varlistentry xmlns="http://docbook.org/ns/docbook">
- <term><parameter>filter</parameter>
(<type>array|object</type>)</term>
+ <term><parameter>filter</parameter></term>
<listitem>
<para>
The search filter.
@@ -1928,6 +1923,82 @@
</listitem>
</varlistentry>
'>
+<!ENTITY mongodb.parameter.newObj '
+ <varlistentry xmlns="http://docbook.org/ns/docbook">
+ <term><parameter>newObj</parameter></term>
+ <listitem>
+ <para>
+ Either an array of update operators, or the full object to be replaced with
+ </para>
+ </listitem>
+ </varlistentry>
+'>
+<!ENTITY mongodb.parameter.deleteOptions '
+ <varlistentry xmlns="http://docbook.org/ns/docbook">
+ <term><parameter>deleteOptions</parameter></term>
+ <listitem>
+ <para>
+ <table>
+ <title>deleteOptions</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>limit</entry>
+ <entry>boolean</entry>
+ <entry>Delete all matching documents (limit=0), or only the first matching document
(limit=1)</entry>
+ <entry>0</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </listitem>
+ </varlistentry>
+'>
+<!ENTITY mongodb.parameter.updateOptions '
+ <varlistentry xmlns="http://docbook.org/ns/docbook">
+ <term><parameter>updateOptions</parameter></term>
+ <listitem>
+ <para>
+ <table>
+ <title>updateOptions</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>multi</entry>
+ <entry>boolean</entry>
+ <entry>Update only the first matching document (multi=false), or all matching
documents (multi=true)</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>upsert</entry>
+ <entry>boolean</entry>
+ <entry>If <parameter>filter</parameter> does not match an existing
document, insert the <parameter>newObj</parameter> as a new object, applying any atomic
modifiers to the <parameter>filter</parameter> if applicable.</entry>
+ <entry>0</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </listitem>
+ </varlistentry>
+'>
<!ENTITY mongodb.returns.WriteResult '
<para xmlns="http://docbook.org/ns/docbook">
Returns <classname>MongoDBDriverWriteResult</classname> on success,
&mongodb.throws.onfailure;.
@@ -1989,16 +2060,6 @@
</listitem>
</varlistentry>'>
-<!ENTITY posix.rlimits '
-<para xmlns="http://docbook.org/ns/docbook">
- Each resource has an associated soft and hard limit. The soft
- limit is the value that the kernel enforces for the corresponding
- resource. The hard limit acts as a ceiling for the soft limit.
- An unprivileged process may only set its soft limit to a value
- from 0 to the hard limit, and irreversibly lower its hard limit.
-</para>
-'>
-
<!-- strings snippets -->
<!ENTITY strings.parameter.encoding '
<para xmlns="http://docbook.org/ns/docbook">
@@ -2053,55 +2114,6 @@
</varlistentry>
'>
-<!-- csprng snippets -->
-<!ENTITY csprng.sources '
-<para xmlns="http://docbook.org/ns/docbook">
- The sources of randomness used for this function are as follows:
-</para>
-<itemizedlist xmlns="http://docbook.org/ns/docbook">
- <listitem>
- <simpara>
- On Windows,
- <link xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="&url.csprng.crypt-gen-random;"><function>CryptGenRandom</function></link>
- will always be used.
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- On Linux, the
- <link xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="&url.csprng.get-random-2;">getrandom(2)</link>
- syscall will be used if available.
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- On other platforms, <filename>/dev/urandom</filename> will be used.
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- If none of the aforementioned sources are available, then an
- <classname>Exception</classname> will be thrown.
- </simpara>
- </listitem>
-</itemizedlist>
-'>
-<!ENTITY csprng.errors '
- <listitem xmlns="http://docbook.org/ns/docbook">
- <simpara>
- If an appropriate source of randomness cannot be found,
- an <classname>Exception</classname> will be thrown.
- </simpara>
- </listitem>
- <listitem xmlns="http://docbook.org/ns/docbook">
- <simpara>
- If invalid parameters are given, a <classname>TypeError</classname>
- will be thrown.
- </simpara>
- </listitem>
-'>
-
-
<!-- Migration Guide snippets -->
<!ENTITY migration56.openssl.peer-verification '
<para xmlns="http://docbook.org/ns/docbook">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=64872
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=64872
------------------------------------------------------------------
Modified: en/reference/password/functions/password-hash.xml
By: Dennis Birkholz on 2015-09-26 07:25:06
===================================================================
--- en/reference/password/functions/password-hash.xml
+++ en/reference/password/functions/password-hash.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 337962 $ -->
+<!-- $Revision: 337585 $ -->
<refentry xml:id="function.password-hash" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
@@ -41,37 +41,39 @@
create the hash. This will produce a standard <function>crypt</function>
compatible hash using
the "$2y$" identifier. The result will always be a 60 character string,
&return.falseforfailure;.
</simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <simpara>
+ Supported Options:
+ </simpara>
+ <para>
+ <itemizedlist>
+ <listitem>
<para>
- Supported Options:
+ <literal>salt</literal> - to manually provide a salt to use when hashing the
password.
+ Note that this will override and prevent a salt from being automatically generated.
+ </para>
+ <para>
+ If omitted, a random salt will be generated by <function>password_hash</function>
for
+ each password hashed. This is the intended mode of operation.
+ </para>
+ <warning>
+ <para>
+ The salt option has been deprecated as of PHP 7.0.0. It is now
+ preferred to simply use the salt that is generated by default.
+ </para>
+ </warning>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>cost</literal> - which denotes the algorithmic cost that should be used.
+ Examples of these values can be found on the <function>crypt</function> page.
+ </para>
+ <para>
+ If omitted, a default value of <literal>10</literal> will be used. This is a good
+ baseline cost, but you may want to consider increasing it depending on your hardware.
</para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>salt</literal> - to manually provide a salt to use when hashing the
password.
- Note that this will override and prevent a salt from being automatically generated.
- </para>
- <para>
- If omitted, a random salt will be generated by
<function>password_hash</function> for
- each password hashed. This is the intended mode of operation.
- </para>
- <warning>
- <para>
- The salt option has been deprecated as of PHP 7.0.0. It is now
- preferred to simply use the salt that is generated by default.
- </para>
- </warning>
- </listitem>
- <listitem>
- <para>
- <literal>cost</literal> - which denotes the algorithmic cost that should be
used.
- Examples of these values can be found on the <function>crypt</function> page.
- </para>
- <para>
- If omitted, a default value of <literal>10</literal> will be used. This is a
good
- baseline cost, but you may want to consider increasing it depending on your hardware.
- </para>
- </listitem>
- </itemizedlist>
</listitem>
</itemizedlist>
</para>
@@ -88,8 +90,8 @@
</para>
<caution>
<para>
- Using the <constant>PASSWORD_BCRYPT</constant> as the
- algorithm, will result
+ Using the <constant>PASSWORD_BCRYPT</constant> for the
+ <parameter>algo</parameter> parameter, will result
in the <parameter>password</parameter> parameter being truncated to a
maximum length of 72 characters.
</para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65016
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65016
------------------------------------------------------------------
Modified: en/reference/url/functions/parse-url.xml
By: Edouard Cunibil on 2015-09-27 04:09:20
===================================================================
--- en/reference/url/functions/parse-url.xml
+++ en/reference/url/functions/parse-url.xml
@@ -257,6 +257,18 @@
slashes (file:///...) are allowed. For any other scheme this is invalid.
</para>
</note>
+ <note>
+ <para>
+ Some URIs may still be properly parsed so the scheme and path keys are
+ filled with the expected values. However, as the purpose of this function
+ is to parse URLs, it can result in unexpected values.
+ For example, trying to parse "tel" URIs can return either an array with
+ a host and a port key (if the phone number is between 1 and 65536), FALSE
+ (if the phone number is 0 or is between 65536 and 99999) or an array with a
+ scheme and a path value (if the phone number is above 99999). This would
+ be the expected behavior.
+ </para>
+ </note>
</refsect1>
<refsect1 role="seealso">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65019
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65019
------------------------------------------------------------------
Modified: en/reference/pdo/pdostatement/errorinfo.xml
By: Daniel on 2015-09-27 04:13:34
===================================================================
--- en/reference/pdo/pdostatement/errorinfo.xml
+++ en/reference/pdo/pdostatement/errorinfo.xml
@@ -48,6 +48,14 @@
</tgroup>
</informaltable>
</para>
+
+ <note>
+ <para>
+ If the SQLSTATE error code is not set or there is no driver-specific
+ error, the elements following element 0 will be set to &null;.
+ </para>
+ </note>
+
</refsect1>
<refsect1 role="examples">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65020
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65020
------------------------------------------------------------------
Modified: en/reference/bzip2/functions/bzflush.xml
By: Rogerio Prado de Jesus on 2015-10-08 02:33:30
===================================================================
--- en/reference/bzip2/functions/bzflush.xml
+++ en/reference/bzip2/functions/bzflush.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 337977 $ -->
+<!-- $Revision: 297028 $ -->
<refentry xml:id="function.bzflush" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>bzflush</refname>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65172
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65172
------------------------------------------------------------------
Modified: en/reference/pdo/lobs.xml
By: Jan Slabon on 2015-10-09 03:07:19
===================================================================
--- en/reference/pdo/lobs.xml
+++ en/reference/pdo/lobs.xml
@@ -102,7 +102,7 @@
$stmt->bindParam(2, $_FILES['file']['type']);
$stmt->bindParam(3, $fp, PDO::PARAM_LOB);
-$stmt->beginTransaction();
+$db->beginTransaction();
$stmt->execute();
$db->commit();
?>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65178
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65178
------------------------------------------------------------------
Modified: en/language/oop5/basic.xml
By: Dennis Birkholz on 2015-10-11 06:08:10
===================================================================
--- en/language/oop5/basic.xml
+++ en/language/oop5/basic.xml
@@ -380,6 +380,14 @@
</screen>
</example>
</para>
+ <note>
+ <para>The class name resolution using <literal>::class</literal> is a
+ compile time transformation. That means at the time the class name string
+ is created no autoloading has happened yet. As a consequence, class names
+ are expanded even if the class does not exist. No error is issued in
+ that case.
+ </para>
+ </note>
</sect2>
</sect1>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65203
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65203
------------------------------------------------------------------
Modified: en/reference/curl/functions/curl-getinfo.xml
By: François Bonzon on 2015-10-13 06:13:25
===================================================================
--- en/reference/curl/functions/curl-getinfo.xml
+++ en/reference/curl/functions/curl-getinfo.xml
@@ -148,7 +148,7 @@
</listitem>
<listitem>
<simpara>
- <constant>CURLINFO_CONTENT_LENGTH_DOWNLOAD</constant> - content-length of
download, read from <literal>Content-Length:</literal> field
+ <constant>CURLINFO_CONTENT_LENGTH_DOWNLOAD</constant> - Content length of
download, read from <literal>Content-Length:</literal> field
</simpara>
</listitem>
<listitem>
@@ -158,7 +158,7 @@
</listitem>
<listitem>
<simpara>
- <constant>CURLINFO_CONTENT_TYPE</constant> -
<literal>Content-Type:</literal> of the requested document, NULL indicates server did
not send valid <literal>Content-Type:</literal> header
+ <constant>CURLINFO_CONTENT_TYPE</constant> -
<literal>Content-Type:</literal> of the requested document. NULL indicates server did
not send valid <literal>Content-Type:</literal> header
</simpara>
</listitem>
<listitem>
@@ -375,18 +375,45 @@
<programlisting role="php">
<![CDATA[
<?php
-// Create a curl handle
-$ch = curl_init('http://www.yahoo.com/');
+// Create a cURL handle
+$ch = curl_init('http://www.example.com/');
// Execute
curl_exec($ch);
// Check if any error occurred
-if(!curl_errno($ch))
-{
- $info = curl_getinfo($ch);
+if (!curl_errno($ch)) {
+ $info = curl_getinfo($ch);
+ echo 'Took ', $info['total_time'], ' seconds to send a request to
', $info['url'], "n";
+}
+
+// Close handle
+curl_close($ch);
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ <example>
+ <title><function>curl_getinfo</function> example with
<parameter>opt</parameter> parameter</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// Create a cURL handle
+$ch = curl_init('http://www.example.com/');
+
+// Execute
+curl_exec($ch);
- echo 'Took ' . $info['total_time'] . ' seconds to send a request to
' . $info['url'];
+// Check HTTP status code
+if (!curl_errno($ch)) {
+ switch ($http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE)) {
+ case 200: # OK
+ break;
+ default:
+ echo 'Unexpected HTTP code: ', $http_code, "n";
+ }
}
// Close handle
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65212
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65212
------------------------------------------------------------------
Modified: en/reference/yaml/functions/yaml-parse.xml
By: bd808 on 2015-10-17 14:29:55
===================================================================
--- en/reference/yaml/functions/yaml-parse.xml
+++ en/reference/yaml/functions/yaml-parse.xml
@@ -14,7 +14,7 @@
<methodparam><type>string</type><parameter>input</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>pos</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter
role="reference">ndocs</parameter></methodparam>
- <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter></methodparam>
+ <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter><initializer>null</initializer></methodparam>
</methodsynopsis>
<para>
Convert all or part of a YAML document stream to a PHP variable.
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65228
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65228
------------------------------------------------------------------
Modified: en/reference/yaml/functions/yaml-emit.xml
By: bd808 on 2015-10-17 14:30:35
===================================================================
--- en/reference/yaml/functions/yaml-emit.xml
+++ en/reference/yaml/functions/yaml-emit.xml
@@ -14,7 +14,7 @@
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>encoding</parameter><initializer>YAML_ANY_ENCODING</initializer></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>linebreak</parameter><initializer>YAML_ANY_BREAK</initializer></methodparam>
- <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter></methodparam>
+ <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter><initializer>null</initializer></methodparam>
</methodsynopsis>
<para>
Generate a YAML representation of the provided <parameter>data</parameter>.
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65229
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65229
------------------------------------------------------------------
Modified: en/reference/yaml/functions/yaml-parse-url.xml
By: bd808 on 2015-10-17 14:30:55
===================================================================
--- en/reference/yaml/functions/yaml-parse-url.xml
+++ en/reference/yaml/functions/yaml-parse-url.xml
@@ -14,7 +14,7 @@
<methodparam><type>string</type><parameter>url</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>pos</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter
role="reference">ndocs</parameter></methodparam>
- <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter></methodparam>
+ <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter><initializer>null</initializer></methodparam>
</methodsynopsis>
<para>
Convert all or part of a YAML document stream read from a URL to a PHP variable.
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65230
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65230
------------------------------------------------------------------
Modified: en/reference/yaml/functions/yaml-parse-file.xml
By: bd808 on 2015-10-17 14:31:15
===================================================================
--- en/reference/yaml/functions/yaml-parse-file.xml
+++ en/reference/yaml/functions/yaml-parse-file.xml
@@ -14,7 +14,7 @@
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>pos</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter
role="reference">ndocs</parameter></methodparam>
- <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter></methodparam>
+ <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter><initializer>null</initializer></methodparam>
</methodsynopsis>
<para>
Convert all or part of a YAML document stream read from a file to a PHP variable.
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65231
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65231
------------------------------------------------------------------
Modified: en/reference/yaml/functions/yaml-emit-file.xml
By: bd808 on 2015-10-17 14:31:34
===================================================================
--- en/reference/yaml/functions/yaml-emit-file.xml
+++ en/reference/yaml/functions/yaml-emit-file.xml
@@ -15,7 +15,7 @@
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>encoding</parameter><initializer>YAML_ANY_ENCODING</initializer></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>linebreak</parameter><initializer>YAML_ANY_BREAK</initializer></methodparam>
- <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter></methodparam>
+ <methodparam
choice="opt"><type>array</type><parameter>callbacks</parameter><initializer>null</initializer></methodparam>
</methodsynopsis>
<para>
Generate a YAML representation of the provided <parameter>data</parameter>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65232
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65232
------------------------------------------------------------------
Modified: en/reference/array/functions/array-keys.xml
By: bd808 on 2015-10-17 14:34:19
===================================================================
--- en/reference/array/functions/array-keys.xml
+++ en/reference/array/functions/array-keys.xml
@@ -11,7 +11,7 @@
<methodsynopsis>
<type>array</type><methodname>array_keys</methodname>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
- <methodparam
choice="opt"><type>mixed</type><parameter>search_value</parameter></methodparam>
+ <methodparam
choice="opt"><type>mixed</type><parameter>search_value</parameter><initializer>null</initializer></methodparam>
<methodparam
choice="opt"><type>bool</type><parameter>strict</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
<para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65233
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65233
------------------------------------------------------------------
Modified: en/reference/array/functions/array-splice.xml
By: bd808 on 2015-10-17 14:35:26
===================================================================
--- en/reference/array/functions/array-splice.xml
+++ en/reference/array/functions/array-splice.xml
@@ -11,7 +11,7 @@
<type>array</type><methodname>array_splice</methodname>
<methodparam><type>array</type><parameter
role="reference">input</parameter></methodparam>
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
- <methodparam
choice="opt"><type>int</type><parameter>length</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>replacement</parameter><initializer>array()</initializer></methodparam>
</methodsynopsis>
<para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65234
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65234
------------------------------------------------------------------
Modified: en/reference/pdo/pdoexception.xml
By: Daniel on 2015-10-19 00:31:06
===================================================================
--- en/reference/pdo/pdoexception.xml
+++ en/reference/pdo/pdoexception.xml
@@ -49,11 +49,6 @@
<type>array</type>
<varname linkend="pdoexception.props.errorinfo">errorInfo</varname>
</fieldsynopsis><!-- }}} -->
- <fieldsynopsis><!-- {{{ code -->
- <modifier>protected</modifier>
- <type>string</type>
- <varname linkend="pdoexception.props.code">code</varname>
- </fieldsynopsis><!-- }}} -->
<classsynopsisinfo
role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)" />
@@ -81,15 +76,6 @@
</para>
</listitem>
</varlistentry><!-- }}} -->
- <varlistentry xml:id="pdoexception.props.code"><!-- {{{ -->
- <term><varname>code</varname></term>
- <listitem>
- <para>
- <literal>SQLSTATE</literal> error code. Use
- <function>Exception::getCode</function> to access it.
- </para>
- </listitem>
- </varlistentry><!-- }}} -->
</variablelist>
</section>
<!-- }}} -->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65238
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65238
------------------------------------------------------------------
Modified: en/appendices/migration56/new-features.xml
By: Hanxue on 2015-10-25 23:30:04
===================================================================
--- en/appendices/migration56/new-features.xml
+++ en/appendices/migration56/new-features.xml
@@ -292,6 +292,40 @@
]]>
</programlisting>
</informalexample>
+ <para>
+ The above example in PHP 5.5 or earlier:
+ </para>
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+resource(6) of type (GMP integer)
+resource(7) of type (GMP integer)
+resource(9) of type (GMP integer)
+]]>
+ </programlisting>
+ </informalexample>
+ <para>
+ The above example in PHP 5.6+:
+ </para>
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+object(GMP)#3 (1) {
+ ["num"]=>
+ string(2) "59"
+}
+object(GMP)#3 (1) {
+ ["num"]=>
+ string(2) "59"
+}
+object(GMP)#3 (1) {
+ ["num"]=>
+ string(2) "59"
+}
+]]>
+ </programlisting>
+ </informalexample>
+
</sect2>
<sect2 xml:id="migration56.new-features.hash-equals">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65272
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65272
------------------------------------------------------------------
Modified: en/reference/strings/functions/htmlentities.xml
By: Hans Henrik Bergan on 2015-10-26 02:52:36
===================================================================
--- en/reference/strings/functions/htmlentities.xml
+++ en/reference/strings/functions/htmlentities.xml
@@ -151,7 +151,7 @@
If the input <parameter>string</parameter> contains an invalid code unit
sequence within the given <parameter>encoding</parameter> an empty string
will be returned, unless either the <constant>ENT_IGNORE</constant> or
- <constant>ENT_SUBSTITUTE</constant> flags are set.
+ <constant>ENT_SUBSTITUTE</constant> or
<constant>ENT_DISALLOWED</constant> flags are set.
</para>
</refsect1>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65273
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65273
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.