Contributions are ready for review
| From: | phpdoc at lists dot php dot net | Date: | Mon, 13 Mar 2017 12:00:03 +0000 |
| Subject: | Contributions are ready for review | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969386526@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/reference/apcu/constants.xml
By: Walt Sorensen on 2016-10-10 09:14:09
===================================================================
--- en/reference/apcu/constants.xml
+++ en/reference/apcu/constants.xml
@@ -5,6 +5,21 @@
&reftitle.constants;
&extension.constants;
+ <title>The APCu Constants</title>
+ <titleabbrev>APCu Constants</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ APCu Constants intro -->
+ <section xml:id="apcu.constants.intro">
+ &reftitle.intro;
+ <para>
+ The APCu Constants below are the same as defined in the APC extension, and will only be
available when the extension has either been compiled into PHP or dynamically loaded at runtime.
+ </para>
+ </section>
+<!-- }}} -->
+ </partintro>
+
<para>
<variablelist>
<varlistentry xml:id="constant.apcu-iter-all">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=69094
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=69094
------------------------------------------------------------------
Modified: en/install/windows/manual.xml
By: Walt Sorensen on 2016-10-10 14:17:12
===================================================================
--- en/install/windows/manual.xml
+++ en/install/windows/manual.xml
@@ -6,8 +6,8 @@
<title>Choose Web Server</title>
<para>
<itemizedlist spacing="compact">
- <listitem>
- <para>
+ <listitem>
+ <para>
IIS is builtin to Windows.
On Windows Server, use Server Manager to add the IIS role. Be sure to include the CGI Role
Feature.
@@ -78,17 +78,17 @@
There are 4 types of PHP builds:
<itemizedlist spacing="compact">
<listitem>
- <para>Thread-Safe(TS) - use for single process web serves, like Apache with
mod_php</para>
+ <para>Thread-Safe(TS) - use for single process web serves, like Apache with
mod_php</para>
</listitem>
<listitem>
- <para>Non-Thread-Safe(NTS) - use for IIS and other FastCGI web servers (Apache with
mod_fastcgi) and recommended for command-line scripts</para>
+ <para>Non-Thread-Safe(NTS) - use for IIS and other FastCGI web servers (Apache with
mod_fastcgi) and recommended for command-line scripts</para>
</listitem>
<listitem>
- <para>x86 - production use of PHP 5.5 or 5.6 or 7.0.</para>
+ <para>x86 - production use of PHP 5.5 or 5.6 or 7.0.</para>
</listitem>
<listitem>
- <para>x64 - production use of PHP 7.0+ unless its a 32-bit only version of Windows. 5.5 and
5.6 x64 are expiremental.</para>
- </listitem>
+ <para>x64 - production use of PHP 7.0+ unless its a 32-bit only version of Windows. 5.5
and 5.6 x64 are expiremental.</para>
+ </listitem>
</itemizedlist>
</para>
</sect2>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=69107
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=69107
------------------------------------------------------------------
Modified: en/reference/mcrypt/constants.xml
By: leigh on 2017-01-11 07:16:44
===================================================================
--- en/reference/mcrypt/constants.xml
+++ en/reference/mcrypt/constants.xml
@@ -16,40 +16,40 @@
<listitem>
<simpara>
<constant>MCRYPT_MODE_ECB</constant> (<literal>electronic
- codebook</literal>) is suitable for random data,
- such as encrypting other keys. Since data there is short and random,
- the disadvantages of ECB have a favorable negative effect.
+ codebook</literal>) is a block cipher mode that is generally
+ unsuitable for most purposes. The use of this mode is not recommended.
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MCRYPT_MODE_CBC</constant> (<literal>cipher block
- chaining</literal>) is especially suitable for
- encrypting files where the security is increased over <literal>ECB</literal>
- significantly.
+ chaining</literal>) is a block cipher mode that is significantly
+ more secure than <literal>ECB</literal> mode.
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MCRYPT_MODE_CFB</constant> (<literal>cipher
- feedback</literal>) is the best mode for encrypting byte
- streams where single bytes must be encrypted.
+ feedback, in 8-bit mode</literal>) is a stream cipher mode.
+ It is recommended to use <literal>NCFB</literal> mode rather
+ than <literal>CFB</literal> mode.
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MCRYPT_MODE_OFB</constant> (<literal>output feedback, in
- 8bit</literal>) is comparable to <literal>CFB</literal>, but
+ 8-bit mode</literal>) is a stream cipher mode comparable to
<literal>CFB</literal>, but
can be used in applications where error propagation cannot
- be tolerated. It's insecure (because it operates in 8bit
- mode) so it is not recommended to use it.
+ be tolerated.
+ It is recommended to use <literal>NOFB</literal> mode rather
+ than <literal>OFB</literal> mode.
</simpara>
</listitem>
<listitem>
<simpara>
<constant>MCRYPT_MODE_NOFB</constant> (<literal>output feedback,
- in nbit</literal>) is comparable to OFB, but
- more secure because it operates on the block size of the algorithm.
+ in n-bit mode</literal>) is comparable to <literal>OFB</literal> mode,
+ but operates on the full block size of the algorithm.
</simpara>
</listitem>
<listitem>
@@ -60,6 +60,25 @@
</listitem>
</itemizedlist>
</para>
+
+ <para>
+ Mcrypt supports some other modes of operation for which there are no predefined constants.
+ They can be utilised by passing a string in place of the missing constants.
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <constant>"ctr"</constant> (<literal>counter mode</literal>)
is a stream cipher mode.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <constant>"ncfb"</constant> (<literal>cipher feedback,
+ in n-bit mode</literal>) is comparable to <literal>CFB</literal> mode,
+ but operates on the full block size of the algorithm.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
<para>
Some other mode and random device constants:
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=71828
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=71828
------------------------------------------------------------------
Modified: en/reference/imagick/imagick/getsize.xml
By: Gabriel Jean on 2017-02-06 18:19:00
===================================================================
--- en/reference/imagick/imagick/getsize.xml
+++ en/reference/imagick/imagick/getsize.xml
@@ -13,9 +13,13 @@
<void/>
</methodsynopsis>
<para>
- Returns the size associated with the Imagick object as an array with the
- keys "columns" and "rows".
+ Get the size in pixels associated with the Imagick object, previously set by
<function>Imagick::setSize</function>.
</para>
+ <note>
+ <para>
+ This method just returns the size that was set using
<function>Imagick::setSize</function>. If you want to get the actual width / height of
the image, use <function>Imagick::getImageWidth</function> and
<function>Imagick::getImageHeight</function>.
+ </para>
+ </note>
</refsect1>
<refsect1 role="returnvalues">
@@ -25,6 +29,43 @@
keys "columns" and "rows".
</para>
</refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Getting the size of a raw RGB image set at 200x400, after scaling to 400x800
(compared to width / height)</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+//Set size first and then load the raw image
+$img = new Imagick();
+$img->setSize(200, 400);
+$img->readImage("image.rgb");
+
+$img->scaleImage(400, 800);
+
+$size = $img->getSize();
+print_r($size);
+
+echo "$img->getImageWidth()."x".$img->getImageHeight();
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+Array
+(
+ [columns] => 200
+ [rows] => 400
+)
+400x800
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
</refentry>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=72296
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=72296
------------------------------------------------------------------
Modified: en/language/oop5/traits.xml
By: Pedro Magalhães on 2017-02-07 14:27:48
===================================================================
--- en/language/oop5/traits.xml
+++ en/language/oop5/traits.xml
@@ -436,9 +436,8 @@
</example>
<para>
If a trait defines a property then a class can not define a property with
- the same name, otherwise an error is issued. It is an
- <constant>E_STRICT</constant> if the class definition is compatible (same
- visibility and initial value) or fatal error otherwise.
+ the same name unless it is compatible (same visibility and initial value),
+ otherwise a fatal error is issued.
</para>
<example xml:id="language.oop5.traits.properties.conflicts">
<title>Conflict Resolution</title>
@@ -452,7 +451,7 @@
class PropertiesExample {
use PropertiesTrait;
- public $same = true; // Strict Standards
+ public $same = true; // Allowed
public $different = true; // Fatal error
}
?>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=72312
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=72312
------------------------------------------------------------------
Modified: en/reference/mbstring/overloading.xml
By: kelunik on 2017-02-09 05:20:32
===================================================================
--- en/reference/mbstring/overloading.xml
+++ en/reference/mbstring/overloading.xml
@@ -5,6 +5,14 @@
<title>
Function Overloading Feature
</title>
+ <caution>
+ <para>
+ This directive will break any code that relies on these fundamental
+ string functions to operate on bytes instead of code points. Its use
+ has thus been discouraged. It will be deprecated in PHP 7.2.0 and
+ removed in PHP 8.
+ </para>
+ </caution>
<para>
You might often find it difficult to get an existing PHP application
to work in a given multibyte environment. This happens because most
@@ -136,14 +144,6 @@
</tgroup>
</table>
</para>
- <note>
- <para>
- It is not recommended to use the function overloading option in
- the per-directory context, because it's not confirmed yet to be
- stable enough in a production environment and may lead to undefined
- behaviour.
- </para>
- </note>
</chapter>
<!-- Keep this comment at the end of the file
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=72330
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=72330
------------------------------------------------------------------
Modified: en/reference/imap/functions/imap-headerinfo.xml
By: Ville Hukkamäki on 2017-02-21 22:35:27
===================================================================
--- en/reference/imap/functions/imap-headerinfo.xml
+++ en/reference/imap/functions/imap-headerinfo.xml
@@ -63,7 +63,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns the information in an object with following properties:
+ Returns <strong>FALSE</strong> on error or, if successful, the information in an
object with following properties:
<itemizedlist>
<listitem>
<simpara>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=72448
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=72448
------------------------------------------------------------------
Modified: en/appendices/reserved.constants.core.xml
By: Jan Altensen on 2017-02-27 02:38:37
===================================================================
--- en/appendices/reserved.constants.core.xml
+++ en/appendices/reserved.constants.core.xml
@@ -135,9 +135,9 @@
<listitem>
<simpara>
The operating system family PHP was built for. Either of
- <literal>'WIN'</literal>,
<literal>'BSD'</literal>,
- <literal>'OSX'</literal>,
<literal>'SOLARIS'</literal>,
- <literal>'LINUX'</literal> or
<literal>'unknown'</literal>.
+ <literal>'Windows'</literal>,
<literal>'BSD'</literal>,
+ <literal>'OSX'</literal>,
<literal>'Solaris'</literal>,
+ <literal>'Linux'</literal> or
<literal>'Unknown'</literal>.
Available as of PHP 7.2.0.
</simpara>
</listitem>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=72506
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=72506
------------------------------------------------------------------
Modified: en/reference/imagick/imagick/identifyimage.xml
By: anonymous on 2017-03-02 01:38:08
===================================================================
--- en/reference/imagick/imagick/identifyimage.xml
+++ en/reference/imagick/imagick/identifyimage.xml
@@ -26,6 +26,7 @@
<term><parameter>appendRawOutput</parameter></term>
<listitem>
<para>
+ If &true; then the raw output is appended to the array.
</para>
</listitem>
</varlistentry>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=72523
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=72523
------------------------------------------------------------------
Modified: en/reference/network/functions/ip2long.xml
By: Matt Coleman on 2017-03-05 11:13:41
===================================================================
--- en/reference/network/functions/ip2long.xml
+++ en/reference/network/functions/ip2long.xml
@@ -115,8 +115,8 @@
if ($long == -1 || $long === FALSE) {
echo 'Invalid IP, please try again';
} else {
- echo $ip . "n"; // 192.0.34.166
- echo $long . "n"; // -1073732954
+ echo $ip . "n"; // 192.0.34.166
+ echo $long . "n"; // 3221234342 (-1073732954 on 32-bit systems, due to
integer overflow)
printf("%un", ip2long($ip)); // 3221234342
}
?>
@@ -141,7 +141,8 @@
<para>
<function>ip2long</function> will return &false; for the IP
<literal>255.255.255.255</literal> in PHP 5 <= 5.0.2. It was fixed in
- PHP 5.0.3 where it returns <literal>-1</literal>.
+ PHP 5.0.3 where it returns <literal>4294967295</literal>. 32-bit systems
+ will return <literal>-1</literal> due to the integer value overflowing.
</para>
</note>
</refsect1>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=72599
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=72599
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.