[prev in list] [next in list] [prev in thread] [next in thread]
List: phpdoc
Subject: Contributions are ready for review
From: phpdoc () lists ! php ! net
Date: 2019-11-25 13:00:04
Message-ID: 201911251300.xAPD04qP011764 () pb11 ! pair ! com
[Download RAW message or body]
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/memcached/ini.xml
By: Julien Boulen on 2018-08-23 06:08:26
===================================================================
--- en/reference/memcached/ini.xml
+++ en/reference/memcached/ini.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 330930 $ -->
+<!-- $Revision: 330931 $ -->
+<!-- Reviewed: No -->
<section xml:id="memcached.configuration" xmlns="http://docbook.org/ns/docbook">
&reftitle.runtime;
@@ -23,76 +24,179 @@
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
- <entry><link linkend="ini.memcached.sess-consistent-hash">memcached.sess_consistent_hash</link></entry>
- <entry>0</entry>
+ <entry><link linkend="ini.memcached.sess-lock-wait-min">memcached.sess_lock_wait_min</link></entry>
+ <entry>150</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
- <entry><link linkend="ini.memcached.sess-binary">memcached.sess_binary</link></entry>
- <entry>0</entry>
+ <entry><link linkend="ini.memcached.sess-lock-wait-max">memcached.sess_lock_wait_max</link></entry>
+ <entry>150</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-lock-retries">memcached.sess_lock_retries</link></entry>
+ <entry>200</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
<row>
- <entry><link linkend="ini.memcached.sess-lock-wait">memcached.sess_lock_wait</link></entry>
- <entry>150000</entry>
+ <entry><link linkend="ini.memcached.sess-lock-expire">memcached.sess_lock_expire</link></entry>
+ <entry>0</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
<entry><link linkend="ini.memcached.sess-prefix">memcached.sess_prefix</link></entry>
<entry>memc.sess.key.</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-persistent">memcached.sess_persistent</link></entry>
+ <entry>Off</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-consistent-hash">memcached.sess_consistent_hash</link></entry>
+ <entry>On</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-consistent-hash-type">memcached.sess_consistent_hash_type</link></entry>
+ <entry>ketama</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-remove-failed-servers">memcached.sess_remove_failed_servers</link></entry>
+ <entry>Off</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-server-failure-limit">memcached.sess_server_failure_limit</link></entry>
+ <entry>0</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
<row>
<entry><link linkend="ini.memcached.sess-number-of-replicas">memcached.sess_number_of_replicas</link></entry>
<entry>0</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-binary-protocol">memcached.sess_binary_protocol</link></entry>
+ <entry>On</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
<row>
<entry><link linkend="ini.memcached.sess-randomize-replica-read">memcached.sess_randomize_replica_read</link></entry>
- <entry>0</entry>
+ <entry>Off</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-connect-timeout">memcached.sess_connect_timeout</link></entry>
+ <entry>1000</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-sasl-username">memcached.sess_sasl_username</link></entry>
+ <entry>null</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.sess-sasl-password">memcached.sess_sasl_password</link></entry>
+ <entry>null</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
<row>
<entry><link linkend="ini.memcached.sess-remove-failed">memcached.sess_remove_failed</link></entry>
<entry>0</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
<entry><link linkend="ini.memcached.compression-type">memcached.compression_type</link></entry>
<entry>fastlz</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
<entry><link linkend="ini.memcached.compression-factor">memcached.compression_factor</link></entry>
<entry>1.3</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
<entry><link linkend="ini.memcached.compression-threshold">memcached.compression_threshold</link></entry>
<entry>2000</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
<entry><link linkend="ini.memcached.serializer">memcached.serializer</link></entry>
- <entry>php</entry>
+ <entry>igbinary</entry>
<entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
+
<row>
- <entry><link linkend="ini.memcached.use-sasl">memcached.use_sasl</link></entry>
+ <entry><link \
linkend="ini.memcached.store-retry-count">memcached.store_retry_count</link></entry> \
+ <entry>2</entry> + <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.default-consistent-hash">memcached.default_consistent_hash</link></entry>
+ <entry>Off</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.default-binary-protocol">memcached.default_binary_protocol</link></entry>
+ <entry>Off</entry>
+ <entry>PHP_INI_ALL</entry>
+ <entry><!-- leave empty, this will be filled by an automatic script \
--></entry> + </row>
+
+ <row>
+ <entry><link linkend="ini.memcached.default-connect-timeout">memcached.default_connect_timeout</link></entry>
<entry>0</entry>
- <entry>PHP_INI_SYSTEM</entry>
+ <entry>PHP_INI_ALL</entry>
<entry><!-- leave empty, this will be filled by an automatic script \
--></entry> </row>
</tbody>
@@ -104,217 +208,360 @@
<para>
<variablelist>
-
<varlistentry xml:id="ini.memcached.sess-locking">
- <term>
- <parameter>memcached.sess_locking</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- Use session locking. Valid values: On, Off, the default is On.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.sess-consistent-hash">
- <term>
- <parameter>memcached.sess_consistent_hash</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- Memcached session consistent hash mode. If set to On, consistent
- hashing is used for session handling. When consistent hashing is used,
- one can add or remove cache node(s) without messing up too much with
- existing keys. The default is Off.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.sess-binary">
- <term>
- <parameter>memcached.sess_binary</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- Use memcached session binary mode. Libmemcached replicas only work if
- binary mode is enabled. The default is Off.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.sess-lock-wait">
- <term>
- <parameter>memcached.sess_lock_wait</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- Session spin lock retry wait time in microseconds. Be carefull when
- setting this value. Valid values are integers, where 0 is interpreted
- as the default value. Negative values result in a reduces locking to a
- try lock. The default is 150000.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.sess-prefix">
- <term>
- <parameter>memcached.sess_prefix</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- Memcached session key prefix. Valid values are strings less than 219
- bytes long. The default value is "memc.sess.key."
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.sess-number-of-replicas">
- <term>
- <parameter>memcached.sess_number_of_replicas</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- The memcached session number of replicas.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.sess-randomize-replica-read">
- <term>
- <parameter>memcached.sess_randomize_replica_read</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- Memcached session replica read randomize.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.sess-remove-failed">
- <term>
- <parameter>memcached.sess_remove_failed</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- Allow failed memcached server to automatically be removed.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.compression-type">
- <term>
- <parameter>memcached.compression_type</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- Set the compression type, valid values are: fastlz, zlib. The default
- is fastlz.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.compression-factor">
- <term>
- <parameter>memcached.compression_factor</parameter>
- <type>float</type>
- </term>
- <listitem>
- <para>
- Compression factor. Store compressed value only if the compression
- factor (saving) exceeds the set limit. Store compressed if:
- <literal>plain_len > comp_len * factor</literal>. The default value
- is 1.3 (23% space saving).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.compression-threshold">
- <term>
- <parameter>memcached.compression_threshold</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- The compression threshold. Do not compress serialized values below this
- threshold. The default is 2000 bytes.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.serializer">
- <term>
- <parameter>memcached.serializer</parameter>
- <type>string</type>
- </term>
- <listitem>
- <para>
- Set the default serializer for new memcached objects. Valid values
- are: php, igbinary, json, json_array.
- </para>
- <variablelist>
- <varlistentry>
- <term>json</term>
- <listitem>
- <para>
- Standard php JSON encoding. This serializer is fast and compact but
- only works on UTF-8 encoded data and does not fully implement
- serializing. See the JSON extension.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>json_array</term>
- <listitem>
- <para>
- As json, but decodes into arrays.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>php</term>
- <listitem>
- <para>
- The standard PHP serializer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>igbinary</term>
- <listitem>
- <para>
- A binary serializer
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The default is igbinary if available and php otherwise.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry xml:id="ini.memcached.use-sasl">
- <term>
- <parameter>memcached.use_sasl</parameter>
- <type>integer</type>
- </term>
- <listitem>
- <para>
- Use SASL authentication for connections. Valid values: On, Off. The
- default is Off.
- </para>
- </listitem>
- </varlistentry>
-
+ <term>
+ <parameter>memcached.sess_locking</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Use session locking. Valid values: On, Off, the default is On.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-lock-wait-min">
+ <term>
+ <parameter>memcached.sess_lock_wait_min</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ The minimum time, in milliseconds, to wait between session lock attempts. This \
value is double on each lock retry until memcached.sess_lock_wait_max is reached, \
after which any further retries will take sess_lock_wait_max seconds. The default is \
150. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-lock-wait-max">
+ <term>
+ <parameter>memcached.sess_lock_wait_max</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ The maximum time, in milliseconds, to wait between session lock attempts. The \
default is 150. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-lock-retries">
+ <term>
+ <parameter>memcached.sess_lock_retries</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ The number of times to retry locking the session lock, not including the first \
attempt. Default is 200. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-lock-expire">
+ <term>
+ <parameter>memcached.sess_lock_retries</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ The time, in seconds, before a lock should release itself. Setting to 0 \
results in the default behaviour, which is to use PHP's max_execution_time. Default \
is 0. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-prefix">
+ <term>
+ <parameter>memcached.sess_prefix</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <para>
+ Memcached session key prefix. Valid values are strings less than 219
+ bytes long. The default value is "memc.sess.key."
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-persistent">
+ <term>
+ <parameter>memcached.sess_persistent</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Whether or not to re-use the memcached connections corresponding to the \
value(s) of session.save_path after the execution of the script ends. Don't use this \
if certain settings (e.g. SASL settings, sess_binary_protocol) would be overridden \
between requests. Default is Off. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-consistent-hash">
+ <term>
+ <parameter>memcached.sess_consistent_hash</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ If set to On, consistent hashing (libketama) is used for session handling. \
When consistent hashing is used, one can add or remove cache node(s) without messing \
up too much with existing keys. Default is On. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-consistent-hash-type">
+ <term>
+ <parameter>memcached.sess_consistent_hash_type</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <para>
+ Memcached session consistent hash type if set to 'ketama', consistent hashing \
(libketama) is used for session handling (default for php-memcached 3.x) if set to \
'ketama_weighted', weighted consistent hashing (libketama) is used for session \
handling (default for php-memcached 2.x). Default is "ketama". + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-remove-failed-servers">
+ <term>
+ <parameter>memcached.sess_remove_failed_servers</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Allow failed memcached server to automatically be removed. Default is Off. (In \
previous versions, this setting was called memcached.sess_remove_failed). + \
</para> + </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-server-failure-limit">
+ <term>
+ <parameter>memcached.sess_server_failure_limit</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Set this value to enable the server be removed after configured number of \
continuous times connection failure. Default is 0. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-number-of-replicas">
+ <term>
+ <parameter>memcached.sess_number_of_replicas</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Write data to a number of additional memcached servers. This is "poor man's \
HA" as libmemcached calls it. If this value is positive and sess_remove_failed is \
enabled when a memcached server fails the session will continue to be available from \
a replica. However, if the failed memcache server becomes available again it will \
read the session from there which could have old data or no data at all. Default is \
0. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-binary-protocol">
+ <term>
+ <parameter>memcached.sess_binary_protocol</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Use the memcached binary protocol for memcached sessions (Instead of the text \
protocol) libmemcached replicas work only if binary mode is enabled. However, certain \
proxies (such as twemproxy) will work only if the binary protocol is disabled. In \
older versions of php-memcached, this setting was Off and was called \
memcached.sess_binary. Default is On with libmemcached 1.0.18 or newer. Default is \
Off with older version. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-randomize-replica-read">
+ <term>
+ <parameter>memcached.sess_randomize_replica_read</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Memcached session replica read randomize.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-connect-timeout">
+ <term>
+ <parameter>memcached.sess_connect_timeout</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ memcached connect timeout value
+ In non-blocking mode this changes the value of the timeout during socket \
connection in milliseconds. Specifying -1 means an infinite timeout. + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-sasl-username">
+ <term>
+ <parameter>memcached.sess_sasl_username</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <para>
+ Session SASL username
+ Both username and password need to be set for SASL to be enabled In addition \
to this memcached.use_sasl needs to be on + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.sess-sasl-password">
+ <term>
+ <parameter>memcached.sess_sasl_password</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <para>
+ Session SASL password
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.compression-type">
+ <term>
+ <parameter>memcached.compression_type</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <para>
+ Set the compression type, valid values are: fastlz, zlib. The default
+ is fastlz.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.compression-factor">
+ <term>
+ <parameter>memcached.compression_factor</parameter>
+ <type>float</type>
+ </term>
+ <listitem>
+ <para>
+ Compression factor. Store compressed value only if the compression
+ factor (saving) exceeds the set limit. Store compressed if:
+ <literal>plain_len > comp_len * factor</literal>. The default value
+ is 1.3 (23% space saving).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.compression-threshold">
+ <term>
+ <parameter>memcached.compression_threshold</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ The compression threshold. Do not compress serialized values below this
+ threshold. The default is 2000 bytes.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.serializer">
+ <term>
+ <parameter>memcached.serializer</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <para>
+ Set the default serializer for new memcached objects. Valid values
+ are: php, igbinary, json, json_array.
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term>json</term>
+ <listitem>
+ <para>
+ Standard php JSON encoding. This serializer is fast and compact but
+ only works on UTF-8 encoded data and does not fully implement
+ serializing. See the JSON extension.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>json_array</term>
+ <listitem>
+ <para>
+ As json, but decodes into arrays.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>php</term>
+ <listitem>
+ <para>
+ The standard PHP serializer.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>igbinary</term>
+ <listitem>
+ <para>
+ A binary serializer
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The default is igbinary if available and php otherwise.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.store-retry-count">
+ <term>
+ <parameter>memcached.store_retry_count</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ The amount of retries for failed store commands.
+ This mechanism allows transparent fail-over to secondary servers when \
set/increment/decrement/setMulti operations fail on the desired server in a \
multi-server environment. the default is 2 + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.default-consistent-hash">
+ <term>
+ <parameter>memcached.default_consistent_hash</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Sets the default for consistent hashing for new connections. (To configure \
consistent hashing for session connections, use memcached.sess_consistent_hash \
instead) +
+ If set to On, consistent hashing (libketama) is used for session handling. \
When consistent hashing is used, one can add or remove cache node(s) without messing \
up too much with existing keys default is Off + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.default-binary-protocol">
+ <term>
+ <parameter>memcached.default_binary_protocol</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Sets the default memcached protocol for new connections. (To configure the \
memcached protocol for connections used by sessions, use \
memcached.sess_binary_protocol instead) +
+ If set to On, the memcached binary protocol is used by default. If set to Off, \
the memcached text protocol is used. Default is Off + </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="ini.memcached.default-connect-timeout">
+ <term>
+ <parameter>memcached.default_connect_timeout</parameter>
+ <type>integer</type>
+ </term>
+ <listitem>
+ <para>
+ Sets the default memcached connection timeout for new connections. (To \
configure the memcached connection timeout for sessions, use \
memcached.sess_connect_timeout instead) +
+ In non-blocking mode this changes the value of the timeout. during socket \
connection in milliseconds. Specifying -1 means an infinite timeout. Specifying 0 \
means using the memcached library's default connection timeout. Default is 0. + \
</para> + </listitem>
+ </varlistentry>
</variablelist>
</para>
</section>
@@ -338,4 +585,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
+-->
No newline at end of file
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85064
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=85064
\
------------------------------------------------------------------
Modified: en/reference/spl/functions/iterator-to-array.xml
By: Joel Wurtz on 2019-01-09 08:31:37
===================================================================
--- en/reference/spl/functions/iterator-to-array.xml
+++ en/reference/spl/functions/iterator-to-array.xml
@@ -138,6 +138,44 @@
]]>
</screen>
</example>
+ <example>
+ <title><function>iterator_to_array</function> with Generator example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+function yield1() {
+ yield 'foo';
+}
+
+function yield2() {
+ yield 'bar';
+
+ yield from yield1();
+}
+
+var_dump(iterator_to_array(yield2(), false));
+var_dump(iterator_to_array(yield2(), true));
+
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+array(2) {
+ [0]=>
+ string(3) "bar"
+ [1]=>
+ string(3) "foo"
+}
+array(1) {
+ [0]=>
+ string(3) "foo"
+}
+]]>
+ </screen>
+ </example>
</para>
</refsect1>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89165
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=89165
\
------------------------------------------------------------------
Modified: en/reference/openssl/functions/openssl-encrypt.xml
By: anonymous on 2019-01-13 05:08:52
===================================================================
--- en/reference/openssl/functions/openssl-encrypt.xml
+++ en/reference/openssl/functions/openssl-encrypt.xml
@@ -187,22 +187,23 @@
$ivlen = openssl_cipher_iv_length($cipher="AES-128-CBC");
$iv = openssl_random_pseudo_bytes($ivlen);
$ciphertext_raw = openssl_encrypt($plaintext, $cipher, $key, \
$options=OPENSSL_RAW_DATA, $iv);
-$hmac = hash_hmac('sha256', $ciphertext_raw, $key, $as_binary=true);
-$ciphertext = base64_encode( $iv.$hmac.$ciphertext_raw );
-
-//decrypt later....
+$hmac = hash_hmac('sha256', $iv.$ciphertext_raw, $key, $as_binary=true);
+$ciphertext = base64_encode( $iv.$ciphertext_raw.$hmac );
+//decrypt later...
+$sha2len = 32;
$c = base64_decode($ciphertext);
-$ivlen = openssl_cipher_iv_length($cipher="AES-128-CBC");
-$iv = substr($c, 0, $ivlen);
-$hmac = substr($c, $ivlen, $sha2len=32);
-$ciphertext_raw = substr($c, $ivlen+$sha2len);
-$original_plaintext = openssl_decrypt($ciphertext_raw, $cipher, $key, \
$options=OPENSSL_RAW_DATA, $iv);
-$calcmac = hash_hmac('sha256', $ciphertext_raw, $key, $as_binary=true);
+$hmac = substr($c, -1*$sha2len);
+$hmac_input = substr($c, 0, -1*$sha2len);
+$calcmac = hash_hmac('sha256', $hmac_input, $key, $as_binary=true);
if (hash_equals($hmac, $calcmac))//PHP 5.6+ timing attack safe comparison
{
+ $ivlen = openssl_cipher_iv_length($cipher="AES-128-CBC");
+ $iv = substr($c, 0, $ivlen);
+ $ciphertext_raw = substr($c, $ivlen, -1*$sha2len);
+ $original_plaintext = openssl_decrypt($ciphertext_raw, $cipher, $key, \
$options=OPENSSL_RAW_DATA, $iv); echo $original_plaintext."n";
}
-?>
+
]]>
</programlisting>
</example>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89229
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=89229
\
------------------------------------------------------------------
Modified: en/reference/reflection/reflectionclass/getmodifiers.xml
By: Florian Berberich on 2019-02-17 03:35:34
===================================================================
--- en/reference/reflection/reflectionclass/getmodifiers.xml
+++ en/reference/reflection/reflectionclass/getmodifiers.xml
@@ -31,12 +31,113 @@
modifier constants</link>.
</para>
</refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>7.2.0</entry>
+ <entry>
+ The returned bitfield now only consists on the value of the
+ <link linkend="reflectionclass.constants.modifiers">modifier \
constants.</link> + </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><methodname>ReflectionClass::getModifiers</methodname> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+trait Trait1 {
+
+}
+
+trait Trait2 {
+ abstract function abstract1();
+}
+
+interface Interface1 {
+
+}
+
+interface Interface2 {
+ function abstract2();
+}
+
+abstract class Abstract1 {
+
+}
+
+abstract class Abstract2 {
+ abstract function abstract3();
+}
+
+class Class1 {
+
+}
+
+final class Class2 {
+
+}
+
+$refTrait1 = new ReflectionClass('Trait1');
+$refTrait2 = new ReflectionClass('Trait2'); // implicit abstract
+$refInterface1 = new ReflectionClass('Interface1');
+$refInterface2 = new ReflectionClass('Interface2'); // implicit abstract
+$refAbstract1 = new ReflectionClass('Abstract1'); // explicit abstract
+$refAbstract2 = new ReflectionClass('Abstract2'); // implicit and explicit abstract
+$refClass1 = new ReflectionClass('Class1');
+$refClass2 = new ReflectionClass('Class2'); // final
+
+var_dump($refTrait1->getModifiers());
+var_dump($refTrait2->getModifiers());
+var_dump($refInterface1->getModifiers());
+var_dump($refInterface2->getModifiers());
+var_dump($refAbstract1->getModifiers());
+var_dump($refAbstract2->getModifiers());
+var_dump($refClass1->getModifiers());
+var_dump($refClass2->getModifiers());
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+int(0)
+int(16)
+int(0)
+int(16)
+int(32)
+int(48)
+int(0)
+int(4)
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
- <member><methodname>ReflectionClass::getProperties</methodname></member>
<member><methodname>Reflection::getModifierNames</methodname></member>
</simplelist>
</para>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89789
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=89789
\
------------------------------------------------------------------
Modified: en/reference/reflection/reflectionclass.xml
By: Florian Berberich on 2019-02-17 03:37:49
===================================================================
--- en/reference/reflection/reflectionclass.xml
+++ en/reference/reflection/reflectionclass.xml
@@ -2,13 +2,13 @@
<!-- $Revision: 321705 $ -->
<phpdoc:classref xml:id="class.reflectionclass" \
xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" \
xmlns:xlink="http://www.w3.org/1999/xlink" \
xmlns:xi="http://www.w3.org/2001/XInclude">
-
+
<title>The ReflectionClass class</title>
<titleabbrev>ReflectionClass</titleabbrev>
-
+
<partintro>
-
-<!-- {{{ ReflectionClass intro -->
+
+ <!-- {{{ ReflectionClass intro -->
<section xml:id="reflectionclass.intro">
&reftitle.intro;
<para>
@@ -16,16 +16,16 @@
information about a class.
</para>
</section>
-<!-- }}} -->
-
+ <!-- }}} -->
+
<section xml:id="reflectionclass.synopsis">
&reftitle.classsynopsis;
-
-<!-- {{{ Synopsis -->
+
+ <!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>ReflectionClass</classname></ooclass>
-
-<!-- {{{ Class synopsis -->
+
+ <!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>ReflectionClass</classname>
@@ -35,7 +35,7 @@
<interfacename>Reflector</interfacename>
</oointerface>
</classsynopsisinfo>
-<!-- }}} -->
+ <!-- }}} -->
<classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
<fieldsynopsis>
<modifier>const</modifier>
@@ -53,25 +53,25 @@
<modifier>const</modifier>
<type>integer</type>
<varname linkend="reflectionclass.constants.is-final">ReflectionClass::IS_FINAL</varname>
- <initializer>64</initializer>
+ <initializer>4</initializer>
</fieldsynopsis>
-
+
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<varname linkend="reflectionclass.props.name">name</varname>
</fieldsynopsis>
-
+
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) \
xpointer(id('class.reflectionclass')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" \
/> </classsynopsis>
-<!-- }}} -->
-
+ <!-- }}} -->
+
</section>
-
-<!-- {{{ ReflectionClass properties -->
+
+ <!-- {{{ ReflectionClass properties -->
<section xml:id="reflectionclass.props">
&reftitle.properties;
<variablelist>
@@ -86,36 +86,39 @@
</varlistentry>
</variablelist>
</section>
-<!-- }}} -->
-
+ <!-- }}} -->
-<!-- {{{ ReflectionClass constants -->
+
+ <!-- {{{ ReflectionClass constants -->
<section xml:id="reflectionclass.constants">
&reftitle.constants;
<section xml:id="reflectionclass.constants.modifiers">
<title>ReflectionClass Modifiers</title>
<variablelist>
-
+
<varlistentry xml:id="reflectionclass.constants.is-implicit-abstract">
<term><constant>ReflectionClass::IS_IMPLICIT_ABSTRACT</constant></term>
<listitem>
<para>
- Indicates class that is <link linkend="language.oop5.abstract">
- abstract</link> because it has some abstract methods.
+ Indicates class is <link linkend="language.oop5.abstract">
+ abstract</link> because it has some abstract methods. This may
+ also be true for interfaces and traits that containt abstract
+ methods.
</para>
</listitem>
</varlistentry>
-
+
<varlistentry xml:id="reflectionclass.constants.is-explicit-abstract">
<term><constant>ReflectionClass::IS_EXPLICIT_ABSTRACT</constant></term>
<listitem>
<para>
- Indicates class that is <link linkend="language.oop5.abstract">
- abstract</link> because of its definition.
+ Indicates class is <link linkend="language.oop5.abstract">
+ abstract</link> because of its definition. This is only true for
+ abstract classes.
</para>
</listitem>
</varlistentry>
-
+
<varlistentry xml:id="reflectionclass.constants.is-final">
<term><constant>ReflectionClass::IS_FINAL</constant></term>
<listitem>
@@ -125,17 +128,72 @@
</para>
</listitem>
</varlistentry>
-
+
</variablelist>
</section>
</section>
-<!-- }}} -->
-
-
+ <!-- }}} -->
+
+ <section role="changelog" xml:id="reflectionclass.changelog"><!-- {{{ -->
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>7.2.0</entry>
+ <entry>
+ Added method: <methodname>isIterable</methodname>.
+ <methodname>isIterateable</methodname> is now an alias of
+ the new method.
+ </entry>
+ </row>
+ <row>
+ <entry>7.1.0</entry>
+ <entry>
+ Added methods: <methodname>getReflectionConstant</methodname>
+ and <methodname>getReflectionConstants</methodname>.
+ </entry>
+ </row>
+ <row>
+ <entry>7.0.0</entry>
+ <entry>
+ The value of <constant>ReflectionClass::IS_FINAL</constant>
+ changed from 64 to 4.
+ </entry>
+ </row>
+ <row>
+ <entry>7.0.0</entry>
+ <entry>
+ Added method: <methodname>isAnonymous</methodname>
+ </entry>
+ </row>
+ <row>
+ <entry>5.4.0</entry>
+ <entry>
+ Added methods: <methodname>isCloneable</methodname>,
+ <methodname>newInstanceWithoutConstructor</methodname>,
+ <methodname>getTraits</methodname>, <methodname>
+ getTraitNames</methodname>, <methodname>getTraitAliases
+ </methodname> and <methodname>isTrait</methodname>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </section><!-- }}} -->
+
</partintro>
-
+
&reference.reflection.entities.reflectionclass;
-
+
</phpdoc:classref>
<!-- Keep this comment at the end of the file
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89783
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=89783
\
------------------------------------------------------------------
Modified: en/reference/reflection/reflectionclass/isiterable.xml
By: Florian Berberich on 2019-02-17 03:41:52
===================================================================
--- en/reference/reflection/reflectionclass/isiterable.xml
+++ en/reference/reflection/reflectionclass/isiterable.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 346865 $ -->
+<!-- $Revision: 344522 $ -->
<refentry xml:id="reflectionclass.isiterable" xmlns="http://docbook.org/ns/docbook" \
xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv>
@@ -14,7 +14,8 @@
<void />
</methodsynopsis>
<para>
- Check whether this class is iterable (i.e. can be used inside &foreach;).
+ Checks whether the class implements the interface \
<interfacename>Traversable</interfacename> + and is actually iterable. Therefore \
abstract classes are not iterable. </para>
</refsect1>
@@ -34,12 +35,12 @@
&reftitle.examples;
<para>
<example>
- <title>Basic <methodname>ReflectionClass::isIterable</methodname> Usage</title>
+ <title><methodname>ReflectionClass::isIterable</methodname> example</title>
<programlisting role="php">
<![CDATA[
<?php
-class IteratorClass implements Iterator {
+abstract class IteratorClass implements Iterator {
public function __construct() { }
public function key() { }
public function current() { }
@@ -50,16 +51,16 @@
class DerivedClass extends IteratorClass { }
class NonIterator { }
-function dump_iterable($class) {
+function dump_iterateable($class) {
$reflection = new ReflectionClass($class);
- var_dump($reflection->isIterable());
+ var_dump($reflection->isIterateable());
}
$classes = array("ArrayObject", "IteratorClass", "DerivedClass", "NonIterator");
foreach ($classes as $class) {
- echo "Is $class iterable? ";
- dump_iterable($class);
+ echo "Is $class iterateable? ";
+ dump_iterateable($class);
}
?>
]]>
@@ -67,25 +68,15 @@
&example.outputs;
<screen>
<![CDATA[
-Is ArrayObject iterable? bool(true)
-Is IteratorClass iterable? bool(true)
-Is DerivedClass iterable? bool(true)
-Is NonIterator iterable? bool(false)
+Is ArrayObject iterateable? bool(true)
+Is IteratorClass iterateable? bool(false)
+Is DerivedClass iterateable? bool(true)
+Is NonIterator iterateable? bool(false)
]]>
</screen>
</example>
</para>
</refsect1>
-
- <refsect1 role="seealso">
- &reftitle.seealso;
- <para>
- <simplelist>
- <member><methodname>ReflectionClass::__construct</methodname></member>
- </simplelist>
- </para>
- </refsect1>
-
</refentry>
<!-- Keep this comment at the end of the file
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89791
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=89791
\
------------------------------------------------------------------
Modified: en/reference/funchand/functions/func-get-args.xml
By: HongWeipeng on 2019-04-07 11:53:10
===================================================================
--- en/reference/funchand/functions/func-get-args.xml
+++ en/reference/funchand/functions/func-get-args.xml
@@ -3,7 +3,7 @@
<refentry xml:id="function.func-get-args" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>func_get_args</refname>
- <refpurpose>Returns an array comprising a function's argument list</refpurpose>
+ <refpurpose>Returns an array of arguments passed to the function</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -13,7 +13,7 @@
<void/>
</methodsynopsis>
<para>
- Gets an array of the function's argument list.
+ Gets an array of arguments passed to the function.
</para>
<para>
This function may be used in conjunction with
@@ -26,7 +26,7 @@
&reftitle.returnvalues;
<para>
Returns an array in which each element is a copy of the corresponding
- member of the current user-defined function's argument list.
+ member passed into the current user-defined function's argument list.
</para>
</refsect1>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=91074
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=91074
\
------------------------------------------------------------------
Modified: en/reference/curl/functions/curl-version.xml
By: Javier Spagnoletti on 2019-05-03 04:19:09
===================================================================
--- en/reference/curl/functions/curl-version.xml
+++ en/reference/curl/functions/curl-version.xml
@@ -93,9 +93,11 @@
<example>
<title><function>curl_version</function> example</title>
<para>
- This example will check which features that's available
+ This example will check which features that are available
in cURL build by using the <literal>'features'</literal> bitmask returned
- by <function>curl_version</function>.
+ by <function>curl_version</function> (see <link linkend="curl.constants">
+ cURL predefined constants</link> for the full list of available \
<constant>CURL_VERSION_*</constant> + constants).
</para>
<programlisting role="php">
<![CDATA[
@@ -103,19 +105,38 @@
// Get curl version array
$version = curl_version();
-// These are the bitfields that can be used
-// to check for features in the curl build
-$bitfields = Array(
- 'CURL_VERSION_IPV6',
- 'CURL_VERSION_KERBEROS4',
- 'CURL_VERSION_SSL',
- 'CURL_VERSION_LIBZ'
+// Depending on your cURL installed version, these are the bitfields that can be \
used +// to check for features in the cURL build
+$bitfields = array(
+ 'CURL_VERSION_ALTSVC',
+ 'CURL_VERSION_ASYNCHDNS',
+ 'CURL_VERSION_BROTLI',
+ 'CURL_VERSION_CONV',
+ 'CURL_VERSION_CURLDEBUG',
+ 'CURL_VERSION_DEBUG',
+ 'CURL_VERSION_GSSAPI',
+ 'CURL_VERSION_GSSNEGOTIATE',
+ 'CURL_VERSION_HTTP2',
+ 'CURL_VERSION_HTTPS_PROXY',
+ 'CURL_VERSION_IDN',
+ 'CURL_VERSION_IPV6',
+ 'CURL_VERSION_KERBEROS4',
+ 'CURL_VERSION_KERBEROS5',
+ 'CURL_VERSION_LARGEFILE',
+ 'CURL_VERSION_LIBZ',
+ 'CURL_VERSION_MULTI_SSL',
+ 'CURL_VERSION_NTLM',
+ 'CURL_VERSION_NTLM_WB',
+ 'CURL_VERSION_PSL',
+ 'CURL_VERSION_SPNEGO',
+ 'CURL_VERSION_SSL',
+ 'CURL_VERSION_SSPI',
+ 'CURL_VERSION_TLSAUTH_SRP',
);
-foreach($bitfields as $feature)
-{
- echo $feature . ($version['features'] & constant($feature) ? ' matches' : ' does \
not match'); +foreach ($bitfields as $feature) {
+ echo $feature . (defined($feature) && $version['features'] & constant($feature) \
? ' matches' : ' does not match'); echo PHP_EOL;
}
?>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=91742
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=91742
\
------------------------------------------------------------------
Modified: en/reference/array/functions/uasort.xml
By: Patrick McDougle on 2019-05-30 11:36:02
===================================================================
--- en/reference/array/functions/uasort.xml
+++ en/reference/array/functions/uasort.xml
@@ -65,20 +65,21 @@
<programlisting role="php">
<![CDATA[
<?php
-// Comparison function
-function cmp($a, $b) {
- if ($a == $b) {
- return 0;
- }
- return ($a < $b) ? -1 : 1;
-}
-// Array to be sorted
-$array = array('a' => 4, 'b' => 8, 'c' => -1, 'd' => -9, 'e' => 2, 'f' => 5, 'g' => \
3, 'h' => -4); +$array = [0 => ['id' => 5, 'name' => 'bravo'], 1 => ['id' => 7, \
'name' => 'alpha']]; +
+usort($array, function($a, $b) {
+ return strcasecmp($a['name'], $b['name']);
+});
+
print_r($array);
-// Sort and print the resulting array
-uasort($array, 'cmp');
+$array = [0 => ['id' => 5, 'name' => 'bravo'], 1 => ['id' => 7, 'name' => 'alpha']];
+
+uasort($array, function($a, $b) {
+ return strcasecmp($a['name'], $b['name']);
+});
+
print_r($array);
?>
]]>
@@ -88,25 +89,33 @@
<![CDATA[
Array
(
- [a] => 4
- [b] => 8
- [c] => -1
- [d] => -9
- [e] => 2
- [f] => 5
- [g] => 3
- [h] => -4
+ [0] => Array
+ (
+ [id] => 7
+ [name] => alpha
+ )
+
+ [1] => Array
+ (
+ [id] => 5
+ [name] => bravo
+ )
+
)
Array
(
- [d] => -9
- [h] => -4
- [c] => -1
- [e] => 2
- [g] => 3
- [a] => 4
- [f] => 5
- [b] => 8
+ [1] => Array
+ (
+ [id] => 7
+ [name] => alpha
+ )
+
+ [0] => Array
+ (
+ [id] => 5
+ [name] => bravo
+ )
+
)
]]>
</screen>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=92055
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=92055
\
------------------------------------------------------------------
Modified: en/reference/dom/domnamednodemap/getnameditem.xml
By: anonymous on 2019-06-12 10:40:52
===================================================================
--- en/reference/dom/domnamednodemap/getnameditem.xml
+++ en/reference/dom/domnamednodemap/getnameditem.xml
@@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <type>DOMNode</type><methodname>DOMNamedNodeMap::getNamedItem</methodname>
+ <type>DOMAttr</type><methodname>DOMNamedNodeMap::getNamedItem</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=92531
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=92531
\
------------------------------------------------------------------
Modified: en/reference/dom/domnamednodemap/getnameditemns.xml
By: anonymous on 2019-06-12 10:41:03
===================================================================
--- en/reference/dom/domnamednodemap/getnameditemns.xml
+++ en/reference/dom/domnamednodemap/getnameditemns.xml
@@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <type>DOMNode</type><methodname>DOMNamedNodeMap::getNamedItemNS</methodname>
+ <type>DomAttr</type><methodname>DOMNamedNodeMap::getNamedItemNS</methodname>
<methodparam><type>string</type><parameter>namespaceURI</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
</methodsynopsis>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=92532
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=92532
\
------------------------------------------------------------------
Modified: en/reference/memcached/constants.xml
By: on 2019-06-19 14:06:36
===================================================================
--- en/reference/memcached/constants.xml
+++ en/reference/memcached/constants.xml
@@ -248,7 +248,7 @@
<listitem>
<para>In non-blocking mode this set the value of the timeout during socket
connection, in milliseconds.</para>
- <para>Type: <literal>integer</literal>, default: <literal>1000</literal>.</para>
+ <para>Type: <literal>integer</literal>, default: <literal>4000</literal>.</para>
</listitem>
</varlistentry>
@@ -257,7 +257,7 @@
<listitem>
<para>The amount of time, in seconds, to wait until retrying a failed
connection attempt.</para>
- <para>Type: <literal>integer</literal>, default: <literal>0</literal>.</para>
+ <para>Type: <literal>integer</literal>, default: <literal>2</literal>.</para>
</listitem>
</varlistentry>
@@ -285,7 +285,7 @@
<term><constant>Memcached::OPT_POLL_TIMEOUT</constant></term>
<listitem>
<para>Timeout for connection polling, in milliseconds.</para>
- <para>Type: <literal>integer</literal>, default: <literal>1000</literal>.</para>
+ <para>Type: <literal>integer</literal>, default: <literal>5000</literal>.</para>
</listitem>
</varlistentry>
@@ -303,7 +303,7 @@
<para>Specifies the failure limit for server connection attempts. The
server will be removed after this many continuous connection
failures.</para>
- <para>Type: <literal>integer</literal>, default: <literal>0</literal>.</para>
+ <para>Type: <literal>integer</literal>, default: <literal>5</literal>.</para>
</listitem>
</varlistentry>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=92604
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=92604
\
------------------------------------------------------------------
Modified: en/reference/pcre/pattern.syntax.xml
By: Julien Falque on 2019-07-30 01:14:04
===================================================================
--- en/reference/pcre/pattern.syntax.xml
+++ en/reference/pcre/pattern.syntax.xml
@@ -275,6 +275,12 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term><emphasis>N</emphasis></term>
+ <listitem>
+ <simpara>any character that is not a newline</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><emphasis>p{xx}</emphasis></term>
<listitem>
<simpara>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=93358
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=93358
\
------------------------------------------------------------------
Modified: en/reference/simplexml/simplexmlelement/addChild.xml
By: jbnahan on 2019-08-05 01:25:33
===================================================================
--- en/reference/simplexml/simplexmlelement/addChild.xml
+++ en/reference/simplexml/simplexmlelement/addChild.xml
@@ -17,9 +17,19 @@
</methodsynopsis>
<para>
Adds a child element to the node and returns a SimpleXMLElement of the child.
+
</para>
</refsect1>
-
+
+ <refsect1 role="notes"><!-- {{{ -->
+ &reftitle.notes;
+ <caution>
+ <para>
+ The parameter <param>value</param> is supposed to be a piece of XML CDATA, so it \
allows entity references. + </para>
+ </caution>
+ </refsect1><!-- }}} -->
+
<refsect1 role="parameters">
&reftitle.parameters;
<para>
@@ -51,7 +61,7 @@
</variablelist>
</para>
</refsect1>
-
+
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
@@ -59,7 +69,7 @@
object representing the child added to the XML node.
</para>
</refsect1>
-
+
<refsect1 role="examples">
&reftitle.examples;
<para>
@@ -143,7 +153,7 @@
</example>
</para>
</refsect1>
-
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=93376
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=93376
\
------------------------------------------------------------------
Modified: en/install/fpm/configuration.xml
By: psi / Kaede Fujisaki on 2019-08-17 07:45:40
===================================================================
--- en/install/fpm/configuration.xml
+++ en/install/fpm/configuration.xml
@@ -260,8 +260,7 @@
</term>
<listitem>
<para>
- Set listen(2) backlog. A value of '-1' means unlimited. Default value:
- -1.
+ Set listen(2) backlog. Default value: 511 (-1 on FreeBSD and OpenBSD).
</para>
</listitem>
</varlistentry>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=93678
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=93678
\
------------------------------------------------------------------
Modified: en/language/oop5/static.xml
By: krzysiek.333@gmail.com on 2019-08-28 10:20:54
===================================================================
--- en/language/oop5/static.xml
+++ en/language/oop5/static.xml
@@ -18,9 +18,9 @@
<para>
Declaring class properties or methods as static makes them accessible
- without needing an instantiation of the class. A property declared as
- static cannot be accessed with an instantiated class object (though
- a static method can).
+ without needing an instantiation of the class. Prior to PHP 5.3, a property \
declared as + static could not be accessed with an instantiated class object \
(though + a static method could).
</para>
<para>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=93839
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=93839
\
------------------------------------------------------------------
Modified: en/reference/mbstring/constants.xml
By: krzysiek.333@gmail.com on 2019-08-31 14:04:29
===================================================================
--- en/reference/mbstring/constants.xml
+++ en/reference/mbstring/constants.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 348297 $ -->
+<!-- $Revision: 345714 $ -->
<appendix xml:id="mbstring.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&extension.constants;
@@ -81,9 +81,9 @@
</simpara>
</listitem>
</varlistentry>
- <varlistentry xml:id="constant.mb-case-lower-simple">
+ <varlistentry xml:id="constant.mb-case-upper-simple">
<term>
- <constant>MB_CASE_LOWER_SIMPLE</constant>
+ <constant>MB_CASE_UPPER_SIMPLE</constant>
(<type>integer</type>)
</term>
<listitem>
@@ -92,9 +92,9 @@
</simpara>
</listitem>
</varlistentry>
- <varlistentry xml:id="constant.mb-case-upper-simple">
+ <varlistentry xml:id="constant.mb-case-lower-simple">
<term>
- <constant>MB_CASE_UPPER_SIMPLE</constant>
+ <constant>MB_CASE_LOWER_SIMPLE</constant>
(<type>integer</type>)
</term>
<listitem>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=93896
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=93896
\
------------------------------------------------------------------
Modified: en/reference/datetime/dateinterval/createfromdatestring.xml
By: Stuart Jones on 2019-09-02 03:44:20
===================================================================
--- en/reference/datetime/dateinterval/createfromdatestring.xml
+++ en/reference/datetime/dateinterval/createfromdatestring.xml
@@ -6,7 +6,7 @@
<refname>DateInterval::createFromDateString</refname>
<refpurpose>Sets up a DateInterval from the relative parts of the \
string</refpurpose> </refnamediv>
-
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="oop">
@@ -18,7 +18,7 @@
parts of the parsed string.
</para>
</refsect1>
-
+
<refsect1 role="parameters">
&reftitle.parameters;
<para>
@@ -38,7 +38,7 @@
</variablelist>
</para>
</refsect1>
-
+
<refsect1 role="examples">
&reftitle.examples;
<para>
@@ -74,14 +74,56 @@
</example>
</para>
</refsect1>
-
+
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a new <classname>DateInterval</classname> instance.
</para>
</refsect1>
-
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns a new <classname>DateInterval</classname> instance.
+ As of PHP 7.2.17 and 7.3.4, this method will return false if passed a badly
+ formatted <parameter>time</parameter> argument.
+ </para>
+ </refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+
+ <para>
+ As of PHP 7.2.17 and 7.3.4, calling this method with a badly formatted
+ <parameter>time</parameter> will generate a <constant>E_WARNING</constant> \
message. + </para>
+ </refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>7.2.17, 7.3.4</entry>
+ <entry>
+ Prior to PHP 7.2.17 and 7.3.4, passing a badly formatted \
<parameter>time</parameter> + would result in a \
<classname>DateInterval</classname> being created with 0 interval. + </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=94149
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=94149
\
------------------------------------------------------------------
Modified: en/reference/parallel/parallel/events/poll.xml
By: Junichi Yamamoto on 2019-09-07 20:34:53
===================================================================
--- en/reference/parallel/parallel/events/poll.xml
+++ en/reference/parallel/parallel/events/poll.xml
@@ -10,7 +10,7 @@
<refsect1 role="description" audience="polling">
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier> \
<type>?Event</type><methodname>parallelEvents::poll</methodname> + \
<modifier>public</modifier> \
<type>?parallelEventsEvent</type><methodname>parallelEvents::poll</methodname> <void \
/> </methodsynopsis>
<para>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=94344
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=94344
\
------------------------------------------------------------------
Modified: en/reference/parallel/parallel/runtime/run.xml
By: Junichi Yamamoto on 2019-09-07 20:35:17
===================================================================
--- en/reference/parallel/parallel/runtime/run.xml
+++ en/reference/parallel/parallel/runtime/run.xml
@@ -10,14 +10,14 @@
<refsect1 role="description" audience="execute">
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier> \
<type>?Future</type><methodname>parallelRuntime::run</methodname> + \
<modifier>public</modifier> \
<type>?parallelFuture</type><methodname>parallelRuntime::run</methodname> \
<methodparam><type>Closure</type><parameter>task</parameter></methodparam> \
</methodsynopsis> <para>
Shall schedule <parameter>task</parameter> for execution in parallel.
</para>
<methodsynopsis>
- <modifier>public</modifier> \
<type>?Future</type><methodname>parallelRuntime::run</methodname> + \
<modifier>public</modifier> \
<type>?parallelFuture</type><methodname>parallelRuntime::run</methodname> \
<methodparam><type>Closure</type><parameter>task</parameter></methodparam> \
<methodparam><type>array</type><parameter>argv</parameter></methodparam> \
</methodsynopsis>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=94345
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=94345
\
------------------------------------------------------------------
Modified: en/reference/var/functions/intval.xml
By: Chris Bornhoft on 2019-09-16 14:20:28
===================================================================
--- en/reference/var/functions/intval.xml
+++ en/reference/var/functions/intval.xml
@@ -120,6 +120,8 @@
echo intval('42', 8); // 34
echo intval(array()); // 0
echo intval(array('foo', 'bar')); // 1
+echo intval(false); // 0
+echo intval(true); // 1
?>
]]>
</programlisting>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=94828
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=94828
\
------------------------------------------------------------------
Modified: en/reference/parallel/parallel/sync/wait.xml
By: krzysiek.333@gmail.com on 2019-09-20 10:25:09
===================================================================
--- en/reference/parallel/parallel/sync/wait.xml
+++ en/reference/parallel/parallel/sync/wait.xml
@@ -14,8 +14,44 @@
<void />
</methodsynopsis>
<para>
- Shall wait for notification on this synchronization object
+ Shall wait for notification on this synchronization object. This method should be \
called only inside <methodname>parallelSync::__invoke</methodname> </para>
+ <example>
+ <title>Example showing correct way to use wait</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$sync = new parallelSync;
+
+parallelrun(function() use($sync) {
+ $sync(function() use($sync) {
+ while ($sync->get() != 42) {
+ $sync->wait();
+ }
+
+ echo "Sync value is 42n";
+ });
+});
+
+echo "Sleep before syncn";
+
+usleep(mt_rand(100, 1000000));
+
+$sync(function() use($sync) {
+ $sync->set(42);
+ $sync->notify();
+});
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+Sleep before sync
+Sync value is 42
+]]>
+ </screen>
+ </example>
</refsect1>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=95010
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=95010
\
------------------------------------------------------------------
Modified: en/reference/parallel/parallel/sync/notify.xml
By: krzysiek.333@gmail.com on 2019-09-20 10:25:39
===================================================================
--- en/reference/parallel/parallel/sync/notify.xml
+++ en/reference/parallel/parallel/sync/notify.xml
@@ -14,8 +14,44 @@
<methodparam choice="opt"><type>bool</type><parameter>all</parameter></methodparam>
</methodsynopsis>
<para>
- Shall notify one (by default) or all threads waiting on the synchronization \
object + Shall notify one (by default) or all threads waiting on the \
synchronization object. This method should be called only inside \
<methodname>parallelSync::__invoke</methodname> </para>
+ <example>
+ <title>Example showing correct way to use notify</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$sync = new parallelSync;
+
+parallelrun(function() use($sync) {
+ $sync(function() use($sync) {
+ while ($sync->get() != 42) {
+ $sync->wait();
+ }
+
+ echo "Sync value is 42n";
+ });
+});
+
+echo "Sleep before syncn";
+
+usleep(mt_rand(100, 1000000));
+
+$sync(function() use($sync) {
+ $sync->set(42);
+ $sync->notify();
+});
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+Sleep before sync
+Sync value is 42
+]]>
+ </screen>
+ </example>
</refsect1>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=95011
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=95011
\
------------------------------------------------------------------
Modified: en/language/types/array.xml
By: Rupok on 2019-10-13 11:02:37
===================================================================
--- en/language/types/array.xml
+++ en/language/types/array.xml
@@ -4,7 +4,7 @@
<title>Arrays</title>
<para>
- An <type>array</type> in PHP is actually an ordered map. A map is a type that
+ An <type>array</type> in PHP is actually a map. A map is a type that
associates <emphasis>values</emphasis> to <emphasis>keys</emphasis>. This type
is optimized for several different uses; it can be treated as an array,
list (vector), hash table (an implementation of a map), dictionary,
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=95445
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=95445
\
------------------------------------------------------------------
Modified: en/reference/ds/ds/set/last.xml
By: Mikko Pesari on 2019-10-22 08:10:31
===================================================================
--- en/reference/ds/ds/set/last.xml
+++ en/reference/ds/ds/set/last.xml
@@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier> <type>void</type><methodname>DsSet::last</methodname>
+ <modifier>public</modifier> \
<type>mixed</type><methodname>DsSet::last</methodname> <void />
</methodsynopsis>
<para>
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=95661
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=95661
\
------------------------------------------------------------------
Modified: en/reference/reflection/reflectionclass/implementsinterface.xml
By: cmp on 2019-11-04 15:27:10
===================================================================
--- en/reference/reflection/reflectionclass/implementsinterface.xml
+++ en/reference/reflection/reflectionclass/implementsinterface.xml
@@ -11,7 +11,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> \
<type>bool</type><methodname>ReflectionClass::implementsInterface</methodname>
- <methodparam><type>string</type><parameter>interface</parameter></methodparam>
+ <methodparam><type>mixed</type><parameter>interface</parameter></methodparam>
</methodsynopsis>
<para>
Checks whether it implements an interface.
@@ -26,7 +26,7 @@
<term><parameter>interface</parameter></term>
<listitem>
<para>
- The interface name.
+ The interface name or a <classname>ReflectionClass</classname> of the \
interface. </para>
</listitem>
</varlistentry>
@@ -40,6 +40,13 @@
&return.success;
</para>
</refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ Throws <classname>ReflectionException</classname> if the interface does not \
exist. + </para>
+ </refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=96047
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=96047
\
------------------------------------------------------------------
Modified: en/reference/mysqli/mysqli/get-client-info.xml
By: Tom Van Looy on 2019-11-15 07:01:02
===================================================================
--- en/reference/mysqli/mysqli/get-client-info.xml
+++ en/reference/mysqli/mysqli/get-client-info.xml
@@ -19,7 +19,6 @@
<para>&style.procedural;</para>
<methodsynopsis>
<type>string</type><methodname>mysqli_get_client_info</methodname>
- <methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
</methodsynopsis>
<para>
Returns a string that represents the MySQL client library version.
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=96253
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=96253
\
------------------------------------------------------------------
Modified: en/reference/mysqli/mysqli/get-client-version.xml
By: Tom Van Looy on 2019-11-15 07:13:23
===================================================================
--- en/reference/mysqli/mysqli/get-client-version.xml
+++ en/reference/mysqli/mysqli/get-client-version.xml
@@ -14,7 +14,6 @@
<para>&style.procedural;</para>
<methodsynopsis>
<type>int</type><methodname>mysqli_get_client_version</methodname>
- <methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
</methodsynopsis>
<para>
Returns client version number as an integer.
=> Put this change into your patches : \
https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=96254
=> Delete this change: \
https://edit.php.net/?project=php&action=deleteThisChange&idDB=96254
\
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic