Contributions are ready for review
| From: | phpdoc at lists dot php dot net | Date: | Mon, 10 Oct 2016 12:00:03 +0000 |
| Subject: | Contributions are ready for review | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969386288@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/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/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/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/appendices/migration71/new-features.xml
By: rjhdby on 2016-10-09 08:17:00
===================================================================
--- en/appendices/migration71/new-features.xml
+++ en/appendices/migration71/new-features.xml
@@ -173,7 +173,7 @@
<type>iterable</type> has been introduced. It may be used in parameter
and return types, where it accepts either arrays or objects that implement
the <classname>Traversable</classname> interface. With respect to subtyping,
- parameter types of child classes may broaden parent's declaration of
<type>array</type>
+ parameter types of child classes may broaden a parent's declaration of
<type>array</type>
or <classname>Traversable</classname> to <type>iterable</type>. With
return types,
child classes may narrow a parent's return type of <type>iterable</type> to
<type>array</type> or an object that implements
<classname>Traversable</classname>.
@@ -373,7 +373,7 @@
version 7.46 and above). This can be leveraged through the
<function>curl_multi_setopt</function> function with the new
<constant>CURLMOPT_PUSHFUNCTION</constant> constant. The constants
- <constant>CURL_PUST_OK</constant> and
<constant>CURL_PUSH_DENY</constant> have also been
+ <constant>CURL_PUSH_OK</constant> and
<constant>CURL_PUSH_DENY</constant> have also been
added so that the execution of the server push callback can either be
approved or denied.
</para>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68815
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68815
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.