Contributions are ready for review
| From: | phpdoc at lists dot php dot net | Date: | Mon, 30 May 2016 12:00:03 +0000 |
| Subject: | Contributions are ready for review | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969386141@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/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: 338252 $ -->
+<!-- $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>
@@ -254,14 +256,8 @@
&reftitle.notes;
<caution>
<para>
- It is strongly recommended that you do not generate your own salt for this
- function. It will create a secure salt automatically for you if you do
- not specify one.
- </para>
- <para>
- As noted above, providing the <literal>salt</literal> option in PHP 7.0
- will generate a deprecation warning. Support for providing a salt manually
- may be removed in a future PHP release.
+ It is strongly recommended that you do not generate your own salt for this function.
+ It will create a secure salt automatically for you if you do not specify one.
</para>
</caution>
<note>
@@ -279,19 +275,16 @@
<para>
<itemizedlist>
<listitem>
- <simpara>
- Any new algorithm must be in core for at least 1 full release of PHP
- prior to becoming default. So if, for example, a new algorithm is added
- in 7.5.5, it would not be eligible for default until 7.7 (since 7.6
- would be the first full release). But if a different algorithm was added
- in 7.6.0, it would also be eligible for default at 7.7.0.
+ <simpara>Any new algorithm must be in core for at least 1 full release of PHP prior to
becoming
+ default. So if, for example, a new algorithm is added in 5.5.5, it would not be eligible for
+ default until 5.7 (since 5.6 would be the first full release). But if a different algorithm
was
+ added in 5.6.0, it would also be eligible for default at 5.7.0.
</simpara>
</listitem>
<listitem>
<simpara>
- The default should only change in a full release (7.3.0, 8.0.0, etc)
- and not in a revision release. The only exception to this is in an
- emergency when a critical security flaw is found in the current
+ The default should only change on a full release (5.6.0, 6.0.0, etc) and not on a revision
release.
+ The only exception to this is in an emergency when a critical security flaw is found in the
current
default.
</simpara>
</listitem>
=> 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/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/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/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
------------------------------------------------------------------
Modified: en/reference/ibase/functions/ibase-prepare.xml
By: DSanchez on 2015-11-14 07:45:03
===================================================================
--- en/reference/ibase/functions/ibase-prepare.xml
+++ en/reference/ibase/functions/ibase-prepare.xml
@@ -10,19 +10,9 @@
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>ibase_prepare</methodname>
-
<methodparam><type>string</type><parameter>query</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis>
- <type>resource</type><methodname>ibase_prepare</methodname>
<methodparam><type>resource</type><parameter>link_identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
</methodsynopsis>
- <methodsynopsis>
- <type>resource</type><methodname>ibase_prepare</methodname>
-
<methodparam><type>resource</type><parameter>link_identifier</parameter></methodparam>
-
<methodparam><type>string</type><parameter>trans</parameter></methodparam>
-
<methodparam><type>string</type><parameter>query</parameter></methodparam>
- </methodsynopsis>
<simpara>
Prepare a query for later binding of parameter placeholders and execution
(via <function>ibase_execute</function>).
@@ -34,6 +24,14 @@
<para>
<variablelist>
<varlistentry>
+ <term><parameter>link_identifier</parameter></term>
+ <listitem>
+ <para>
+ An InterBase link identifier.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><parameter>query</parameter></term>
<listitem>
<para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65435
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65435
------------------------------------------------------------------
Modified: en/reference/pdo/pdostatement/execute.xml
By: Oscar Merida on 2015-11-19 19:38:41
===================================================================
--- en/reference/pdo/pdostatement/execute.xml
+++ en/reference/pdo/pdostatement/execute.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 338832 $ -->
+<!-- $Revision: 334762 $ -->
<refentry xml:id="pdostatement.execute" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PDOStatement::execute</refname>
@@ -14,18 +14,13 @@
<methodparam
choice="opt"><type>array</type><parameter>input_parameters</parameter></methodparam>
</methodsynopsis>
<para>
- Execute the <link linkend="pdo.prepared-statements">prepared
- statement</link>. If the prepared statement included parameter markers, you
- must either:
+ Execute the prepared statement. If the prepared statement included
+ parameter markers, either:
<itemizedlist>
- <listitem><para>call <function>PDOStatement::bindParam</function>
and/or
- <function>PDOStatement::bindValue</function> to bind either variables or
- values (respectively) to the parameter markers. Bound variables pass
- their value as input and receive the output value, if any, of their
- associated parameter markers</para></listitem>
- <listitem>
- <para>or pass an array of input-only parameter values</para>
- </listitem>
+ <listitem><para>call <function>PDOStatement::bindParam</function> to
bind PHP variables
+ to the parameter markers: bound variables pass their value as input and receive the
+ output value, if any, of their associated parameter markers</para></listitem>
+ <listitem><para>or pass an array of input-only parameter
values</para></listitem>
</itemizedlist>
</para>
</refsect1>
@@ -43,12 +38,11 @@
All values are treated as <constant>PDO::PARAM_STR</constant>.
</para>
<para>
- You cannot bind multiple values to a single parameter; for example,
- you cannot bind two values to a single named parameter in an IN()
- clause.
+ Multiple values cannot bind to a single parameter; for example,
+ a single named parameter in an IN() clause cannot bind to two values.
</para>
<para>
- You cannot bind more values than specified; if more keys exist in
+ Binding more values than specified is not possible; if more keys exist in
<parameter>input_parameters</parameter> than in the SQL specified
in the <methodname>PDO::prepare</methodname>, then the statement will
fail and an error is emitted.
@@ -93,18 +87,18 @@
<refsect1 role="examples">
&reftitle.examples;
- <example><title>Execute a prepared statement with a bound variable and
value</title>
+ <example><title>Execute a prepared statement with bound variables</title>
<programlisting role="php">
<![CDATA[
<?php
-/* Execute a prepared statement by binding a variable and value */
+/* Execute a prepared statement by binding PHP variables */
$calories = 150;
-$colour = 'gre';
+$colour = 'red';
$sth = $dbh->prepare('SELECT name, colour, calories
FROM fruit
- WHERE calories < :calories AND colour LIKE :colour');
+ WHERE calories < :calories AND colour = :colour');
$sth->bindParam(':calories', $calories, PDO::PARAM_INT);
-$sth->bindValue(':colour', "%{$colour}%");
+$sth->bindParam(':colour', $colour, PDO::PARAM_STR, 12);
$sth->execute();
?>
]]>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65473
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65473
------------------------------------------------------------------
Modified: en/reference/misc/functions/uniqid.xml
By: Scott on 2015-12-13 21:02:11
===================================================================
--- en/reference/misc/functions/uniqid.xml
+++ en/reference/misc/functions/uniqid.xml
@@ -108,7 +108,7 @@
in fact without being passed any additional parameters the return
value is little different from <function>microtime</function>. If
you need to generate cryptographically secure tokens use
- <function>openssl_random_pseudo_bytes</function>.
+ <function>random_bytes</function>.
</para>
</caution>
<note>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65626
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65626
------------------------------------------------------------------
Modified: en/reference/strings/functions/str-shuffle.xml
By: Scott on 2015-12-13 21:02:41
===================================================================
--- en/reference/strings/functions/str-shuffle.xml
+++ en/reference/strings/functions/str-shuffle.xml
@@ -16,6 +16,18 @@
<function>str_shuffle</function> shuffles a string. One permutation
of all possible is created.
</simpara>
+
+ <warning>
+ <para>
+ This function does not create random nor unpredictable strings.
+ <emphasis>This function must not be used for security purposes.</emphasis>
+ Use a cryptographically secure random function/generator and
+ cryptographically secure hash functions to create unpredictable
+ secure IDs. If you need to generate cryptographically secure tokens,
+ use <function>random_bytes</function>.
+ </para>
+ </warning>
+
</refsect1>
<refsect1 role="parameters">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=65627
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=65627
------------------------------------------------------------------
Modified: en/language/oop5/properties.xml
By: Richard Wossal on 2016-01-18 05:29:47
===================================================================
--- en/language/oop5/properties.xml
+++ en/language/oop5/properties.xml
@@ -67,22 +67,23 @@
class SimpleClass
{
// invalid property declarations:
- public $var1 = 'hello ' . 'world';
- public $var2 = <<<EOD
+ public $var1 = <<<EOD
hello world
EOD;
- public $var3 = 1+2;
- public $var4 = self::myStaticMethod();
- public $var5 = $myVar;
+ public $var2 = self::myStaticMethod();
+ public $var3 = $myVar;
// valid property declarations:
- public $var6 = myConstant;
- public $var7 = array(true, false);
-
- // This is allowed only in PHP 5.3.0 and later.
- public $var8 = <<<'EOD'
+ public $var4 = 'hello';
+ // valid in PHP 5.3.0 and later:
+ public $var5 = <<<'EOD'
hello world
EOD;
+ // valid in PHP 5.6.0 and later:
+ public $var6 = 'hello ' . 'world';
+ public $var7 = 1+2;
+ public $var8 = myConstant;
+ public $var9 = array(true, false);
}
?>
]]>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66032
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66032
------------------------------------------------------------------
Modified: en/reference/apcu/apcuiterator/construct.xml
By: Robin Appelman on 2016-01-18 10:39:45
===================================================================
--- en/reference/apcu/apcuiterator/construct.xml
+++ en/reference/apcu/apcuiterator/construct.xml
@@ -25,15 +25,6 @@
&reftitle.parameters;
<variablelist>
<varlistentry>
- <term><parameter>cache</parameter></term>
- <listitem>
- <para>
- The cache type, which will be <literal>user</literal> or
- <literal>file</literal>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><parameter>search</parameter></term>
<listitem>
<para>
@@ -90,7 +81,7 @@
<programlisting role="php">
<![CDATA[
<?php
-foreach (new APCUIterator('user', '/^counter./') as $counter) {
+foreach (new APCUIterator('/^counter./') as $counter) {
echo "$counter[key]: $counter[value]n";
apc_dec($counter['key'], $counter['value']);
}
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66034
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66034
------------------------------------------------------------------
Modified: en/reference/stream/functions/stream-socket-enable-crypto.xml
By: Stéphane HULARD on 2016-02-22 02:15:43
===================================================================
--- en/reference/stream/functions/stream-socket-enable-crypto.xml
+++ en/reference/stream/functions/stream-socket-enable-crypto.xml
@@ -57,11 +57,19 @@
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv2_CLIENT</constant></simpara></listitem>
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv3_CLIENT</constant></simpara></listitem>
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv23_CLIENT</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_ANY_CLIENT</constant></simpara></listitem>
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLS_CLIENT</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT</constant></simpara></listitem>
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv2_SERVER</constant></simpara></listitem>
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv3_SERVER</constant></simpara></listitem>
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv23_SERVER</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_ANY_SERVER</constant></simpara></listitem>
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLS_SERVER</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_0_SERVER</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_1_SERVER</constant></simpara></listitem>
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_2_SERVER</constant></simpara></listitem>
</itemizedlist>
</para>
<para>
@@ -106,6 +114,12 @@
<row>
<entry>5.6.0</entry>
<entry>
+ Introduce <constant>STREAM_CRYPTO_METHOD_ANY_CLIENT</constant>,
<constant>STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT</constant>,
<constant>STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT</constant>,
<constant>STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT</constant>,
<constant>STREAM_CRYPTO_METHOD_ANY_SERVER</constant>,
<constant>STREAM_CRYPTO_METHOD_TLSv1_0_SERVER</constant>,
<constant>STREAM_CRYPTO_METHOD_TLSv1_1_SERVER</constant>,
<constant>STREAM_CRYPTO_METHOD_TLSv1_2_SERVER</constant>.
+ </entry>
+ </row>
+ <row>
+ <entry>5.6.0</entry>
+ <entry>
The <parameter>crypto_type</parameter> is now optional.
</entry>
</row>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66270
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66270
------------------------------------------------------------------
Modified: en/reference/errorfunc/functions/set-error-handler.xml
By: Oli Griffiths on 2016-02-26 08:43:36
===================================================================
--- en/reference/errorfunc/functions/set-error-handler.xml
+++ en/reference/errorfunc/functions/set-error-handler.xml
@@ -56,6 +56,16 @@
custom error handler cannot be called since it is not registered at that
time.
</para>
+
+ <note>
+ <para>
+ If a custom error handler is not registered, <constant>E_RECOVERABLE</constant>
errors are promoted to <constant>E_ERROR</constant>
+ and WILL cause the engine to stop executing.
+ However if a custom error handler is registered, <constant>E_RECOVERABLE</constant>
(for example: typehint) errors will NOT cause the engine to stop executing,
+ and requires custom handling within the registered error handler.
+ See <link
linkend="errorfunc.constants#errorfunc.constants.errorlevels.e-recoverable-error">error
constants</link>
+ </para>
+ </note>
</refsect1>
<refsect1 role="parameters">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66342
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66342
------------------------------------------------------------------
Modified: en/reference/bc/book.xml
By: Hans Henrik Bergan on 2016-02-29 09:37:04
===================================================================
--- en/reference/bc/book.xml
+++ en/reference/bc/book.xml
@@ -11,7 +11,7 @@
&reftitle.intro;
<para>
For arbitrary precision mathematics PHP offers the Binary Calculator which
- supports numbers of any size and precision, represented as strings.
+ supports numbers of any size and precision up to 2147483647-1 (or 0x7FFFFFFF-1) decimals,
represented as strings.
</para>
</preface>
<!-- }}} -->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66350
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66350
------------------------------------------------------------------
Modified: en/reference/array/functions/array-map.xml
By: Pierre-Chanel Gauthier on 2016-03-02 02:10:45
===================================================================
--- en/reference/array/functions/array-map.xml
+++ en/reference/array/functions/array-map.xml
@@ -32,9 +32,29 @@
<varlistentry>
<term><parameter>callback</parameter></term>
<listitem>
- <para>
- Callback function to run for each element in each array.
- </para>
+ <methodsynopsis>
+
<type>mixed</type><methodname><replaceable>callback</replaceable></methodname>
+
<methodparam><type>mixed</type><parameter>item1</parameter></methodparam>
+ <methodparam
choice="opt"><type>mixed</type><parameter>itemN</parameter></methodparam>
+ </methodsynopsis>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>item1</parameter></term>
+ <listitem>
+ <para>
+ Holds the element of the current iteration for <parameter>array1</parameter>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>itemN</parameter></term>
+ <listitem>
+ <para>
+ Holds the element of the current iteration for <parameter>arrayN</parameter>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</listitem>
</varlistentry>
<varlistentry>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66360
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66360
------------------------------------------------------------------
Modified: en/appendices/migration70/incompatible/other.xml
By: Matthieu Napoli on 2016-03-21 02:47:47
===================================================================
--- en/appendices/migration70/incompatible/other.xml
+++ en/appendices/migration70/incompatible/other.xml
@@ -278,13 +278,14 @@
<title>JSON extension replaced with JSOND</title>
<para>
- The JSON extension has been replaced with JSOND, causing two minor BC
+ The JSON extension has been replaced with JSOND, causing 3 minor BC
breaks. Firstly, a number must not end in a decimal point (i.e.
<literal>34.</literal> must be changed to either <literal>34.0</literal>
or
<literal>34</literal>). Secondly, when using scientific notation, the
<literal>e</literal> exponent must not immediately follow a decimal point
(i.e. <literal>3.e3</literal> must be changed to either
- <literal>3.0e3</literal> or <literal>3e3</literal>).
+ <literal>3.0e3</literal> or <literal>3e3</literal>). Finally an empty
+ string is no longer considered as valid JSON.
</para>
</sect3>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66508
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66508
------------------------------------------------------------------
Modified: en/reference/strings/functions/explode.xml
By: Jay Paroline on 2016-03-23 17:21:38
===================================================================
--- en/reference/strings/functions/explode.xml
+++ en/reference/strings/functions/explode.xml
@@ -150,8 +150,10 @@
*/
$input1 = "hello";
$input2 = "hello,there";
+$input3 = ',';
var_dump( explode( ',', $input1 ) );
var_dump( explode( ',', $input2 ) );
+var_dump( explode( ',', $input3 ) );
?>
]]>
@@ -168,6 +170,11 @@
[0] => string(5) "hello"
[1] => string(5) "there"
)
+array(2)
+(
+ [0] => string(0) ""
+ [1] => string(0) ""
+)
]]>
</screen>
</example>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66522
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66522
------------------------------------------------------------------
Modified: en/reference/solr/solrquery/sethighlightregexslop.xml
By: gunbei on 2016-03-28 09:00:17
===================================================================
--- en/reference/solr/solrquery/sethighlightregexslop.xml
+++ en/reference/solr/solrquery/sethighlightregexslop.xml
@@ -14,7 +14,7 @@
<methodparam><type>float</type><parameter>factor</parameter></methodparam>
</methodsynopsis>
<para>
- The factor by which the regex fragmenter can stray from the ideal fragment size ( specfied by
SolrQuery::setHighlightFragsize )to accomodate the regular expression
+ The factor by which the regex fragmenter can stray from the ideal fragment size ( specfied by
SolrQuery::setHighlightFragsize )to accommodate the regular expression
</para>
</refsect1>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66612
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66612
------------------------------------------------------------------
Modified: en/reference/array/functions/array-filter.xml
By: Jesse Donat on 2016-04-04 10:13:45
===================================================================
--- en/reference/array/functions/array-filter.xml
+++ en/reference/array/functions/array-filter.xml
@@ -240,6 +240,12 @@
added, deleted or unset) the behavior of this function is undefined.
</para>
</caution>
+
+ <caution>
+ <para>
+ As of PHP7 the value of the callback may no longer be used by reference.
+ </para>
+ </caution>
</refsect1>
<refsect1 role="seealso">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66717
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66717
------------------------------------------------------------------
Modified: en/reference/array/functions/array-key-exists.xml
By: Nikolay Labinskiy on 2016-04-09 00:54:42
===================================================================
--- en/reference/array/functions/array-key-exists.xml
+++ en/reference/array/functions/array-key-exists.xml
@@ -50,6 +50,12 @@
<para>
&return.success;
</para>
+ <caution>
+ <para>
+ <function>array_key_exists</function> will search for the kyes in first dimention
only.
+ Nested kyes in multidimensional arrays will not be found.
+ </para>
+ </caution>
</refsect1>
<refsect1 role="examples">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66777
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66777
------------------------------------------------------------------
Modified: en/reference/array/functions/array-multisort.xml
By: Juris on 2016-04-09 13:33:47
===================================================================
--- en/reference/array/functions/array-multisort.xml
+++ en/reference/array/functions/array-multisort.xml
@@ -262,7 +262,7 @@
</screen>
<para>
The data as an array, called <varname>data</varname>. This would usually,
- for example, be obtained by looping with <function>mysql_fetch_assoc</function>.
+ for example, be obtained by looping with <function>mysqli_fetch_assoc</function>.
</para>
<programlisting role="php">
<![CDATA[
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66788
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66788
------------------------------------------------------------------
Modified: en/language/oop5/interfaces.xml
By: Roscius on 2016-04-12 14:14:10
===================================================================
--- en/language/oop5/interfaces.xml
+++ en/language/oop5/interfaces.xml
@@ -8,9 +8,9 @@
handled.
</para>
<para>
- Interfaces are defined using the <literal>interface</literal> keyword, in the same
way as a
- standard class, but without any of the methods having their contents
- defined.
+ Interfaces are defined in the same was as a class, but with the
<literal>interface</literal>
+ keyword replacing the <literal>class</literal> keyword and without any of the
methods having
+ their contents defined.
</para>
<para>
All methods declared in an interface must be public; this is the nature of an
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66859
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66859
------------------------------------------------------------------
Modified: en/reference/gmagick/gmagick/write.xml
By: Dan Brooks on 2016-04-12 20:19:29
===================================================================
--- en/reference/gmagick/gmagick/write.xml
+++ en/reference/gmagick/gmagick/write.xml
@@ -2,54 +2,17 @@
<!-- $Revision: 288721 $ -->
<refentry xml:id="gmagick.write" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+
<refnamediv>
<refname>Gmagick::write</refname>
- <refpurpose>Writes an image to the specified filename</refpurpose>
+ <refpurpose>&Alias;
<methodname>Gmagick::writeimage</methodname></refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
- <methodsynopsis>
- <modifier>public</modifier>
<type>void</type><methodname>Gmagick::write</methodname>
-
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
- </methodsynopsis>
- <para>
- Writes an image to the specified filename. If the filename parameter is NULL,
-the image is written to the filename set by Gmagick::ReadImage() or Gmagick::SetImageFilename().
- </para>
-
-
-
- </refsect1>
-
- <refsect1 role="parameters">
- &reftitle.parameters;
- <para>
- <variablelist>
- <varlistentry>
- <term><parameter>filename</parameter></term>
- <listitem>
- <para>
- The image filename.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
-
- <refsect1 role="returnvalues">
- &reftitle.returnvalues;
- <para>
- The Gmagick object
- </para>
- </refsect1>
-
- <refsect1 role="errors">
- &reftitle.errors;
- <para>
- &gmagick.gmagickexception.throw;
- </para>
+ <simpara>
+ This method is an alias of <methodname>Gmagick::writeimage</methodname>.
+ </simpara>
</refsect1>
</refentry>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66863
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66863
------------------------------------------------------------------
Modified: en/reference/sockets/functions/socket-sendmsg.xml
By: mekras on 2016-04-18 05:48:21
===================================================================
--- en/reference/sockets/functions/socket-sendmsg.xml
+++ en/reference/sockets/functions/socket-sendmsg.xml
@@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <type>int</type><methodname>socket_sendmsg</methodname>
+ <type>mixed</type><methodname>socket_sendmsg</methodname>
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
<methodparam><type>array</type><parameter>message</parameter></methodparam>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
@@ -50,6 +50,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
+ Returns the number of characters sent, or &false; on failure.
</para>
</refsect1>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66964
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66964
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.