| Newsgroups |
gmane.comp.php.documentation.general |
| Message-ID |
<[email protected]> |
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 :
-----------------------
New file: en/reference/sqlite3/sqlite3/backup.xml
By: BohwaZ on 2019-12-01 14:40:58
===================================================================
--- en/reference/sqlite3/sqlite3/backup.xml
+++ en/reference/sqlite3/sqlite3/backup.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<refentry xml:id="sqlite3.backup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>SQLite3::backup</refname>
+ <refpurpose>Creates a backup of the current SQLite database using the Online Backup API</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <modifier>public</modifier> <type>bool</type><methodname>SQLite3::backup</methodname>
+ <methodparam><type>SQLite3</type><parameter>destination_db</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>source_dbname</parameter><initializer>"main"</initializer></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>destination_dbname</parameter><initializer>"main"</initializer></methodparam>
+ </methodsynopsis>
+ <para>
+ Creates a backup of the SQLite database to the destination database object passed as first parameter, using the <link xlink:href="https://www.sqlite.org/backup.html">online backup API</link>.
+ You can specify the names of source and destination names databases if you have attached one.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>destination_db</parameter></term>
+ <listitem>
+ <para>
+ SQLite3 database object for the destination of the backup.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>source_dbname</parameter></term>
+ <listitem>
+ <para>
+ Name of the source database.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>destination_dbname</parameter></term>
+ <listitem>
+ <para>
+ Name of the destination database.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ The default destination and source database name is <literal>"main"</literal>, but any name of a database opened using <literal>ATTACH</literal> can be used.
+ </para>
+ <para>Note that if you have created temporary tables using <literal>CREATE TEMP TABLE</literal>, they can be backed up using <literal>"temp"</literal> as a database name.
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ This method will return true or generate an error or an exception if it fails.
+ </para>
+ </refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ If the database is locked or is busy, this method will throw an exception or generate an error.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Simple backup example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$db = new SQLite3('data.sqlite');
+$db->backup(new SQLite3('backup.sqlite'));
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=97065
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=97065
------------------------------------------------------------------
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/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/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: [email protected] 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/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/sync/wait.xml
By: [email protected] 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: [email protected] 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/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
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 348968 $ -->
+<!-- $Revision: 343950 $ -->
<refentry xml:id="mysqli.get-client-info" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysqli::$client_info</refname>
@@ -19,7 +19,6 @@
<para>&style.procedural;</para>
<methodsynopsis>
<type>string</type><methodname>mysqli_get_client_info</methodname>
- <methodparam choice="opt"><type>mysqli</type><parameter>link</parameter><initializer>NULL</initializer></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
------------------------------------------------------------------
Modified: en/reference/array/functions/array-diff.xml
By: anonymous on 2019-12-03 17:47:39
===================================================================
--- en/reference/array/functions/array-diff.xml
+++ en/reference/array/functions/array-diff.xml
@@ -17,7 +17,7 @@
<para>
Compares <parameter>array1</parameter> against one or more other arrays and
returns the values in <parameter>array1</parameter> that are not present in
- any of the other arrays.
+ any of the other arrays. Note that keys are preserved.
</para>
</refsect1>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=97142
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=97142
------------------------------------------------------------------
Modified: en/reference/array/functions/array-column.xml
By: anonymous on 2019-12-12 18:00:06
===================================================================
--- en/reference/array/functions/array-column.xml
+++ en/reference/array/functions/array-column.xml
@@ -69,7 +69,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns an array of values representing a single column from the input array.
+ Returns an array of values representing a single column from the input array,
+ an array re-keyed by a single column from the input, or a combination of both.
+ The order of the keys and values in the result array correspond to those in
+ the input array.
</para>
</refsect1>
<refsect1 role="changelog">
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=97460
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=97460
------------------------------------------------------------------
Modified: en/reference/curl/configure.xml
By: Chris Maiden on 2019-12-24 09:42:53
===================================================================
--- en/reference/curl/configure.xml
+++ en/reference/curl/configure.xml
@@ -3,29 +3,31 @@
<section xml:id="curl.installation" xmlns="http://docbook.org/ns/docbook">
&reftitle.install;
<para>
- To use PHP's cURL support you must also compile PHP <option
+ To use PHP's cURL support you must compile PHP <option
+ role="configure">--with-curl</option>.</para>
+ <para>Before PHP 7.4.0 it was possible to compile PHP <option
role="configure">--with-curl[=DIR]</option> where DIR is the
location of the directory containing the <filename>lib</filename> and <filename>include</filename>
directories. In the <filename>include</filename> directory there should be a folder
named <filename>curl</filename> which should contain the <filename>easy.h</filename> and
<filename>curl.h</filename> files. There should be a file named
- <filename>libcurl.a</filename> located in the <filename>lib</filename> directory. Before
- PHP 5.5.0 it was possible to configure PHP to use cURL for URL streams
+ <filename>libcurl.a</filename> located in the <filename>lib</filename> directory.</para>
+ <para>Before PHP 5.5.0 it was possible to configure PHP to use cURL for URL streams
<option role="configure">--with-curlwrappers</option>.
</para>
<note>
<title>Note to Win32 Users</title>
<simpara>
- In order to enable this module on a Windows environment,
- <filename>libeay32.dll</filename> and <filename>ssleay32.dll</filename>, or, as of OpenSSL 1.1
- <filename>libcrypto-*.dll</filename> and <filename>libssl-*.dll</filename>,
- must be present in your <envar>PATH</envar>.
- Also <filename>libssh2.dll</filename> must be present in your <envar>PATH</envar>.
+ In order to enable this module on a Windows environment,
+ <filename>libeay32.dll</filename> and <filename>ssleay32.dll</filename>, or, as of OpenSSL 1.1
+ <filename>libcrypto-*.dll</filename> and <filename>libssl-*.dll</filename>,
+ must be present in your <envar>PATH</envar>.
+ Also <filename>libssh2.dll</filename> must be present in your <envar>PATH</envar>.
</simpara>
<simpara>
- You don't need <filename>libcurl.dll</filename> from the cURL site.
+ You don't need <filename>libcurl.dll</filename> from the cURL site.
</simpara>
- </note>
+ </note>
</section>
<!-- Keep this comment at the end of the file
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=97855
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=97855
------------------------------------------------------------------
Modified: en/reference/filesystem/functions/flock.xml
By: anonymous on 2020-01-06 21:20:58
===================================================================
--- en/reference/filesystem/functions/flock.xml
+++ en/reference/filesystem/functions/flock.xml
@@ -167,6 +167,7 @@
/* ... */
+flock($fp, LOCK_UN);
fclose($fp);
?>
]]>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=98057
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=98057
------------------------------------------------------------------
Modified: en/reference/spl/runtimeexception.xml
By: Jesse Rushlow on 2020-01-27 10:33:04
===================================================================
--- en/reference/spl/runtimeexception.xml
+++ en/reference/spl/runtimeexception.xml
@@ -48,6 +48,7 @@
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.runtimeexception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
-->
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
</classsynopsis>
<!-- }}} -->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=98298
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=98298
------------------------------------------------------------------
Modified: en/reference/pcre/book.xml
By: anonymous on 2020-02-02 12:12:20
===================================================================
--- en/reference/pcre/book.xml
+++ en/reference/pcre/book.xml
@@ -26,7 +26,7 @@
Modifiers</link>.
</para>
<para>
- PHP also supports regular expressions using a POSIX-extended syntax
+ Prior to PHP 7.0.0, PHP also supported regular expressions using a POSIX-extended syntax
using the <link linkend="book.regex">POSIX-extended regex functions</link>.
</para>
<note>
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=98493
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=98493
------------------------------------------------------------------
Modified: en/language/oop5/properties.xml
By: anonymous on 2020-02-08 16:14:03
===================================================================
--- en/language/oop5/properties.xml
+++ en/language/oop5/properties.xml
@@ -170,7 +170,48 @@
</screen>
</example>
</para>
+ <para>
+ A typed property must have a value before accessing it either by declaring it with a default value or thru assignment. Otherwise, an Error will be thrown when the property is first accessed.
+ <example>
+ <title>Example of uninitialized typed properties throwing errors</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+class User
+{
+ public int $id;
+ public string $name;
+
+ public function __construct(int $id)
+ {
+ $this->id = $id;
+ }
+}
+
+$user = new User(1234);
+echo "ID: " . $user->id;
+echo "n";
+echo "Name: " . $user->name; /// name was not initialized before access
+
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+ID: 1234
+Fatal error: Uncaught Error: Typed property User::$name must not be accessed before initialization
+]]>
+ </screen>
+ </example>
+ </para>
+ <note>
+ <para>
+ Since the default value of a typed property is considered to be uninitialized, properties with nullable types have to have a value assigned as well. Therefore, the implicit value of a property with a nullable type is not NULL.
+ </para>
+ </note>
+
</sect1>
<!-- Keep this comment at the end of the file
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=98719
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=98719
------------------------------------------------------------------
Modified: en/internals2/opcodes/recv.xml
By: anonymous on 2020-02-20 02:58:26
===================================================================
--- en/internals2/opcodes/recv.xml
+++ en/internals2/opcodes/recv.xml
@@ -8,7 +8,7 @@
<![CDATA[
<?php
/*
- * Receive a functoin argument of "argument-number" and store the argument value into a variable of "argument-number". (e.g. $1 for 1)
+ * Receive a function argument of "argument-number" and store the argument value into a variable of "argument-number". (e.g. $1 for 1)
* opcode number: 63
*/
function hello($a){}
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=98872
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=98872
------------------------------------------------------------------
Modified: en/reference/mysqli/examples.xml
By: anonymous on 2020-03-12 12:05:40
===================================================================
--- en/reference/mysqli/examples.xml
+++ en/reference/mysqli/examples.xml
@@ -55,16 +55,43 @@
exit;
}
-// Perform an SQL query
-$sql = "SELECT actor_id, first_name, last_name FROM actor WHERE actor_id = $aid";
-if (!$result = $mysqli->query($sql)) {
- // Oh no! The query failed.
+// Prepare an SQL statement
+$sql = 'SELECT actor_id, first_name, last_name FROM actor WHERE actor_id = ?';
+if (!($stmt = $mysqli->prepare($sql))) {
+ // Oh no! The query failed.
+ echo "Sorry, the website is experiencing problems.";
+
+ // Again, do not do this on a public site, but we'll show you how
+ // to get the error information
+ echo "Error: Our statement could not be created and here is why: n";
+ echo "Statement: " . $sql . "n";
+ echo "Errno: " . $mysqli->errno . "n";
+ echo "Error: " . $mysqli->error . "n";
+ exit;
+}
+
+// Bind variables to the SQL statement
+if (!$stmt->bind_param('i', $aid)) {
+ // Oh no! The query failed.
+ echo "Sorry, the website is experiencing problems.";
+
+ // Again, do not do this on a public site, but we'll show you how
+ // to get the error information
+ echo "Error: Our statement could not bind parameters and here is why: n";
+ echo "Parameter: " . $aid . "n";
+ echo "Errno: " . $mysqli->errno . "n";
+ echo "Error: " . $mysqli->error . "n";
+ exit;
+}
+
+// Execute the statement
+if (!$stmt->execute()) {
+ // Oh no! The query failed.
echo "Sorry, the website is experiencing problems.";
// Again, do not do this on a public site, but we'll show you how
// to get the error information
echo "Error: Our query failed to execute and here is why: n";
- echo "Query: " . $sql . "n";
echo "Errno: " . $mysqli->errno . "n";
echo "Error: " . $mysqli->error . "n";
exit;
@@ -72,6 +99,8 @@
// Phew, we made it. We know our MySQL connection and query
// succeeded, but do we have a result?
+$result = $stmt->get_result();
+
if ($result->num_rows === 0) {
// Oh, no rows! Sometimes that's expected and okay, sometimes
// it is not. You decide. In this case, maybe actor_id was too
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=99208
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=99208
------------------------------------------------------------------
Modified: en/reference/dom/domdocument/createelement.xml
By: anonymous on 2020-03-12 19:46:23
===================================================================
--- en/reference/dom/domdocument/createelement.xml
+++ en/reference/dom/domdocument/createelement.xml
@@ -54,6 +54,10 @@
Returns a new instance of class <classname>DOMElement</classname> or &false;
if an error occurred.
</para>
+ <para>
+ This will instead return the subclass if you have overridden it with
+ <method>DOMDocument::registerNodeClass</method>.
+ </para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=99214
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=99214
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.