Contributions are ready for review

From: Date: Mon, 25 Feb 2019 13:00:03 +0000
Subject: Contributions are ready for review
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969387180@lists.php.net to get a copy of this message
Hello PHP EN Documentation team, There are contributions within the online editor queue for this language. Please review, then commit or delete these patches. Patches for review : ----------------------- Modified: en/install/unix/nginx.xml By: yangbai on 2018-06-08 02:34:57 =================================================================== --- en/install/unix/nginx.xml +++ en/install/unix/nginx.xml @@ -82,7 +82,7 @@ <screen> <![CDATA[ cp php.ini-development /usr/local/php/php.ini -cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf +cp /usr/local/etc/php-fpm.d/www.conf.default /usr/local/etc/php-fpm.d/www.conf cp sapi/fpm/php-fpm /usr/local/bin ]]> </screen> @@ -134,7 +134,7 @@ <informalexample xml:id="install.unix.nginx.modify.phpfpm"> <screen> <![CDATA[ -vim /usr/local/etc/php-fpm.conf +vim /usr/local/etc/php-fpm.d/www.conf ]]> </screen> </informalexample> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=83720 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=83720 ------------------------------------------------------------------ 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 &gt; 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 &gt; 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/sodium/functions/sodium-crypto-sign-verify-detached.xml By: Craig Francis on 2018-08-26 12:43:21 =================================================================== --- en/reference/sodium/functions/sodium-crypto-sign-verify-detached.xml +++ en/reference/sodium/functions/sodium-crypto-sign-verify-detached.xml @@ -13,7 +13,7 @@ <type>bool</type><methodname>sodium_crypto_sign_verify_detached</methodname> <methodparam><type>string</type><parameter>signature</parameter></methodparam> <methodparam><type>string</type><parameter>msg</parameter></methodparam> - <methodparam><type>string</type><parameter>key</parameter></methodparam> + <methodparam><type>string</type><parameter>public_key</parameter></methodparam> </methodsynopsis> <para> @@ -43,7 +43,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>key</parameter></term> + <term><parameter>public_key</parameter></term> <listitem> <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=85091 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=85091 ------------------------------------------------------------------ Modified: en/reference/ldap/functions/ldap-connect.xml By: heiglandreas on 2018-11-21 10:03:14 =================================================================== --- en/reference/ldap/functions/ldap-connect.xml +++ en/reference/ldap/functions/ldap-connect.xml @@ -31,11 +31,10 @@ <para> <variablelist> <varlistentry> - <term><parameter>host</parameter></term> + <term><parameter>LDAP-URI</parameter></term> <listitem> <para> - This field supports using a hostname or, with OpenLDAP 2.x.x and - later, a full LDAP URI of the form <literal>ldap://hostname:port</literal> + A full LDAP URI of the form <literal>ldap://hostname:port</literal> or <literal>ldaps://hostname:port</literal> for SSL encryption. </para> <para> @@ -44,34 +43,28 @@ <para> Note that <literal>hostname:port</literal> is not a supported LDAP URI as the schema is missing. </para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>port</parameter></term> - <listitem> - <para> - The port to connect to. Not used when using LDAP URIs. - </para> + <para>For backwards compatibility this field supports using a single hostname or IP-address</para> </listitem> </varlistentry> </variablelist> </para> + <para>Note that this function also still supports passing a host (or IP) and a port as 2 separate parameters. This is merely for backwards compatibility and is considered deprecated and should not be used anymore!</para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns a positive LDAP link identifier when the provided hostname/port combination or LDAP URI - seems plausible. It's a syntactic check of the provided parameters but the server(s) will not + Returns a positive LDAP link identifier when the provided LDAP URI + seems plausible. It's a syntactic check of the provided parameter but the server(s) will not be contacted! If the syntactic check fails it returns &false;. - When OpenLDAP 2.x.x is used, <function>ldap_connect</function> will always + <function>ldap_connect</function> will otherwise return a <type>resource</type> as it does not actually connect but just initializes the connecting parameters. The actual connect happens with the next calls to ldap_* funcs, usually with <function>ldap_bind</function>. </para> <para> - If no arguments are specified then the link identifier of the already + If no argument is specified then the link identifier of the already opened link will be returned. </para> </refsect1> @@ -86,12 +79,11 @@ <?php // LDAP variables -$ldaphost = "ldap.example.com"; // your ldap servers -$ldapport = 389; // your ldap server's port number +$ldapuri = "ldap://ldap.example.com:389"; // your ldap-uri // Connecting to LDAP -$ldapconn = ldap_connect($ldaphost, $ldapport) - or die("Could not connect to $ldaphost"); +$ldapconn = ldap_connect($ldapuri) + or die("That LDAP-URI was not parseable"); ?> ]]> @@ -109,7 +101,7 @@ // Connecting to LDAP $ldapconn = ldap_connect($ldaphost) - or die("Could not connect to {$ldaphost}"); + or die("That LDAP-URI was not parseable"); ?> ]]> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=86812 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=86812 ------------------------------------------------------------------ Modified: en/reference/curl/functions/curl-getinfo.xml By: kasper Franz on 2018-11-22 05:25:19 =================================================================== --- en/reference/curl/functions/curl-getinfo.xml +++ en/reference/curl/functions/curl-getinfo.xml @@ -11,7 +11,7 @@ <methodsynopsis> <type>mixed</type><methodname>curl_getinfo</methodname> <methodparam><type>resource</type><parameter>ch</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>opt</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>opt</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> Gets information about the last transfer. => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=86822 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=86822 ------------------------------------------------------------------ Modified: en/reference/curl/curlfile/construct.xml By: kasper Franz on 2018-11-22 05:40:38 =================================================================== --- en/reference/curl/curlfile/construct.xml +++ en/reference/curl/curlfile/construct.xml @@ -14,15 +14,15 @@ <methodsynopsis> <modifier>public</modifier> <methodname>CURLFile::__construct</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>mimetype</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>postname</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>mimetype</parameter><initializer>"application/octet-stream"</initializer></methodparam> + <methodparam choice="opt"><type>string</type><parameter>postname</parameter><initializer>"defaults to the name paramater."</initializer></methodparam> </methodsynopsis> <para>&style.procedural;</para> <methodsynopsis> <type>CURLFile</type><methodname>curl_file_create</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>mimetype</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>postname</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>mimetype</parameter><initializer>"application/octet-stream"</initializer></methodparam> + <methodparam choice="opt"><type>string</type><parameter>postname</parameter><initializer>"defaults to the name paramater."</initializer></methodparam> </methodsynopsis> <para> Creates a <classname>CURLFile</classname> object, used to upload a file with <constant>CURLOPT_POSTFIELDS</constant>. => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=86823 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=86823 ------------------------------------------------------------------ Modified: en/reference/dom/domdocument/createprocessinginstruction.xml By: kasper Franz on 2018-11-22 10:30:12 =================================================================== --- en/reference/dom/domdocument/createprocessinginstruction.xml +++ en/reference/dom/domdocument/createprocessinginstruction.xml @@ -10,7 +10,7 @@ <methodsynopsis> <modifier>public</modifier> <type>DOMProcessingInstruction</type><methodname>DOMDocument::createProcessingInstruction</methodname> <methodparam><type>string</type><parameter>target</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>data</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> This function creates a new instance of class => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=86839 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=86839 ------------------------------------------------------------------ Modified: en/reference/dom/domdocument/createelementns.xml By: kasper Franz on 2018-11-22 10:31:02 =================================================================== --- en/reference/dom/domdocument/createelementns.xml +++ en/reference/dom/domdocument/createelementns.xml @@ -13,7 +13,7 @@ <modifier>public</modifier> <type>DOMElement</type><methodname>DOMDocument::createElementNS</methodname> <methodparam><type>string</type><parameter>namespaceURI</parameter></methodparam> <methodparam><type>string</type><parameter>qualifiedName</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>value</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> This function creates a new element node with an associated namespace. => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=86841 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=86841 ------------------------------------------------------------------ Modified: en/reference/dom/domdocument/createelement.xml By: kasper Franz on 2018-11-22 10:32:07 =================================================================== --- en/reference/dom/domdocument/createelement.xml +++ en/reference/dom/domdocument/createelement.xml @@ -10,7 +10,7 @@ <methodsynopsis> <modifier>public</modifier> <type>DOMElement</type><methodname>DOMDocument::createElement</methodname> <methodparam><type>string</type><parameter>name</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>value</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> This function creates a new instance of class => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=86844 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=86844 ------------------------------------------------------------------ Modified: en/reference/funchand/functions/func-get-args.xml By: HongWeipeng on 2018-12-07 00:56:17 =================================================================== --- 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 => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=87517 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=87517 ------------------------------------------------------------------ Modified: en/reference/exec/functions/proc-open.xml By: kasper Franz on 2018-12-10 08:23:54 =================================================================== --- en/reference/exec/functions/proc-open.xml +++ en/reference/exec/functions/proc-open.xml @@ -15,9 +15,9 @@ <methodparam><type>string</type><parameter>cmd</parameter></methodparam> <methodparam><type>array</type><parameter>descriptorspec</parameter></methodparam> <methodparam><type>array</type><parameter role="reference">pipes</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>cwd</parameter></methodparam> - <methodparam choice="opt"><type>array</type><parameter>env</parameter></methodparam> - <methodparam choice="opt"><type>array</type><parameter>other_options</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>cwd</parameter><initializer>&null;</initializer></methodparam> + <methodparam choice="opt"><type>array</type><parameter>env</parameter><initializer>&null;</initializer></methodparam> + <methodparam choice="opt"><type>array</type><parameter>other_options</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> <function>proc_open</function> is similar to <function>popen</function> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=87916 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=87916 ------------------------------------------------------------------ Modified: en/reference/ftp/functions/ftp-fput.xml By: Huiren Woo on 2018-12-26 04:22:13 =================================================================== --- en/reference/ftp/functions/ftp-fput.xml +++ en/reference/ftp/functions/ftp-fput.xml @@ -87,7 +87,7 @@ <row> <entry>7.3.0</entry> <entry> - The <parameter>mode</parameter> parameter is now optional. Formerly it + The <parameter>mode</parameter> parameter is now optional as the default transfer mode is set to <constant>FTP_BINARY</constant>. Formerly it has been mandatory. </entry> </row> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=88477 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=88477 ------------------------------------------------------------------ Modified: en/reference/array/functions/array-splice.xml By: girgias on 2018-12-28 11:39:52 =================================================================== --- en/reference/array/functions/array-splice.xml +++ en/reference/array/functions/array-splice.xml @@ -48,10 +48,13 @@ <term><parameter>offset</parameter></term> <listitem> <para> - If <parameter>offset</parameter> is positive then the start of removed - portion is at that offset from the beginning of the - <parameter>input</parameter> array. If <parameter>offset</parameter> - is negative then it starts that far from the end of the + If <parameter>offset</parameter> is positive then the start of the + removed portion is at that offset from the beginning of the + <parameter>input</parameter> array. + </para> + <para> + If <parameter>offset</parameter> is negative then the start of the + removed portion is at that offset from the end of the <parameter>input</parameter> array. </para> </listitem> @@ -61,18 +64,25 @@ <listitem> <para> If <parameter>length</parameter> is omitted, removes everything - from <parameter>offset</parameter> to the end of the array. If - <parameter>length</parameter> is specified and is positive, then - that many elements will be removed. If - <parameter>length</parameter> is specified and is negative then - the end of the removed portion will be that many elements from - the end of the array. If <parameter>length</parameter> is - specified and is zero, no elements will be removed. - Tip: to remove everything from - <parameter>offset</parameter> to the end of the array when - <parameter>replacement</parameter> is also specified, use - <literal>count($input)</literal> for - <parameter>length</parameter>. + from <parameter>offset</parameter> to the end of the array. + </para> + <para> + If <parameter>length</parameter> is specified and is positive, + then that many elements will be removed. + </para> + <para> + If <parameter>length</parameter> is specified and is negative, + then the end of the removed portion will be that many elements + from the end of the array. + </para> + <para> + If <parameter>length</parameter> is specified and is zero, + no elements will be removed. + </para> + <para> + Tip: to remove everything from <parameter>offset</parameter> to the end + of the array when <parameter>replacement</parameter> is also specified, + use <literal>count($input)</literal> for <parameter>length</parameter>. </para> </listitem> </varlistentry> @@ -87,12 +97,15 @@ If <parameter>offset</parameter> and <parameter>length</parameter> are such that nothing is removed, then the elements from the <parameter>replacement</parameter> array are inserted in the place - specified by the <parameter>offset</parameter>. Note that keys in - replacement array are not preserved. + specified by the <parameter>offset</parameter>. + </para> + <para> + Note that the keys in the <parameter>replacement</parameter> array + are not preserved. </para> <para> If <parameter>replacement</parameter> is just one element it is - not necessary to put <literal>array()</literal> + not necessary to put <literal>array()</literal> or square brackets around it, unless the element is an array itself, an object or &null;. </para> </listitem> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=88553 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=88553 ------------------------------------------------------------------ Modified: en/reference/array/functions/array-slice.xml By: girgias on 2018-12-28 11:53:17 =================================================================== --- en/reference/array/functions/array-slice.xml +++ en/reference/array/functions/array-slice.xml @@ -38,9 +38,13 @@ <listitem> <para> If <parameter>offset</parameter> is non-negative, the sequence will - start at that offset in the <parameter>array</parameter>. If - <parameter>offset</parameter> is negative, the sequence will + start at that offset in the <parameter>array</parameter>. + </para> + <para> + If <parameter>offset</parameter> is negative, the sequence will start that far from the end of the <parameter>array</parameter>. + </para> + <para> Note that the <parameter>offset</parameter> denotes the position in the array, not the key. </para> @@ -50,13 +54,19 @@ <term><parameter>length</parameter></term> <listitem> <para> - If <parameter>length</parameter> is given and is positive, then - the sequence will have up to that many elements in it. If the array - is shorter than the <parameter>length</parameter>, then only the - available array elements will be present. If - <parameter>length</parameter> is given and is negative then the - sequence will stop that many elements from the end of the - array. If it is omitted, then the sequence will have everything + If <parameter>length</parameter> is given and is positive, + then the sequence will have up to that many elements in it. + </para> + <para> + If the array is shorter than the <parameter>length</parameter>, + then only the available array elements will be present. + </para> + <para> + If <parameter>length</parameter> is given and is negative then the + sequence will stop that many elements from the end of the array. + </para> + <para> + If it is omitted, then the sequence will have everything from <parameter>offset</parameter> up until the end of the <parameter>array</parameter>. </para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=88554 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=88554 ------------------------------------------------------------------ Modified: en/reference/var/functions/isset.xml By: girgias on 2018-12-29 21:09:38 =================================================================== --- en/reference/var/functions/isset.xml +++ en/reference/var/functions/isset.xml @@ -3,7 +3,7 @@ <refentry xml:id="function.isset" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>isset</refname> - <refpurpose>Determine if a variable is set and is not &null;</refpurpose> + <refpurpose>Determine if a variable is declared and is different than &null;</refpurpose> </refnamediv> <refsect1 role="description"> @@ -14,18 +14,20 @@ <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> </methodsynopsis> <para> - Determine if a variable is set and is not &null;. + Determine if a variable is considered set, + this means if a variable is declared and is different than &null;. </para> <para> - If a variable has been unset with <function>unset</function>, it will no - longer be set. <function>isset</function> will return &false; if testing a - variable that has been set to &null;. Also note that a null character - (<literal>" "</literal>) is not equivalent to the PHP &null; constant. + If a variable has been unset with the <function>unset</function> function, it will no longer be set. + </para> + <para> + <function>isset</function> will return &false; when checking a variable that has been assigned to &null;. + Also note that a null character (<literal>" "</literal>) is not equivalent to the PHP &null; constant. </para> <para> If multiple parameters are supplied then <function>isset</function> will - return &true; only if all of the parameters are set. Evaluation goes from - left to right and stops as soon as an unset variable is encountered. + return &true; only if all of the parameters are considered set. + Evaluation goes from left to right and stops as soon as an unset variable is encountered. </para> </refsect1> @@ -56,8 +58,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns &true; if <parameter>var</parameter> exists and has value other - than &null;. &false; otherwise. + Returns &true; if <parameter>var</parameter> exists and has any value other than &null;. &false; otherwise. </para> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=88620 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=88620 ------------------------------------------------------------------ Modified: en/reference/datetime/datetimezone/gettransitions.xml By: kasper Franz on 2019-01-03 11:08:23 =================================================================== --- en/reference/datetime/datetimezone/gettransitions.xml +++ en/reference/datetime/datetimezone/gettransitions.xml @@ -19,8 +19,8 @@ <methodsynopsis role="procedural"> <type>array</type><methodname>timezone_transitions_get</methodname> <methodparam><type>DateTimeZone</type><parameter>object</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>timestamp_begin</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>timestamp_end</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>timestamp_begin</parameter><initializer><constant>PHP_INT_MIN</constant></initializer></methodparam> + <methodparam choice="opt"><type>int</type><parameter>timestamp_end</parameter><initializer><constant>PHP_INT_MIN</constant></initializer></methodparam> </methodsynopsis> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=88940 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=88940 ------------------------------------------------------------------ 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/array/functions/in-array.xml By: girgias on 2019-01-11 06:46:22 =================================================================== --- en/reference/array/functions/in-array.xml +++ en/reference/array/functions/in-array.xml @@ -14,7 +14,7 @@ <methodparam choice="opt"><type>bool</type><parameter>strict</parameter><initializer>&false;</initializer></methodparam> </methodsynopsis> <para> - Searches <parameter>haystack</parameter> for <parameter>needle</parameter> using loose comparison + Searches for <parameter>needle</parameter> in <parameter>haystack</parameter> using loose comparison unless <parameter>strict</parameter> is set. </para> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89214 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89214 ------------------------------------------------------------------ Modified: en/reference/array/functions/array-search.xml By: girgias on 2019-01-11 06:51:30 =================================================================== --- en/reference/array/functions/array-search.xml +++ en/reference/array/functions/array-search.xml @@ -14,7 +14,7 @@ <methodparam choice="opt"><type>bool</type><parameter>strict</parameter><initializer>&false;</initializer></methodparam> </methodsynopsis> <para> - Searches <parameter>haystack</parameter> for <parameter>needle</parameter>. + Searches for <parameter>needle</parameter> in <parameter>haystack</parameter>. </para> </refsect1> <refsect1 role="parameters"> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89215 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89215 ------------------------------------------------------------------ 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/stream/constants.xml By: girgias on 2019-02-07 08:50:42 =================================================================== --- en/reference/stream/constants.xml +++ en/reference/stream/constants.xml @@ -14,7 +14,7 @@ </thead> <tbody> <row xml:id="constant.stream-filter-read"> - <entry><constant>STREAM_FILTER_READ</constant> *</entry> + <entry><constant>STREAM_FILTER_READ</constant></entry> <entry> Used with <function>stream_filter_append</function> and <function>stream_filter_prepend</function> to indicate @@ -23,7 +23,7 @@ </entry> </row> <row xml:id="constant.stream-filter-write"> - <entry><constant>STREAM_FILTER_WRITE</constant> *</entry> + <entry><constant>STREAM_FILTER_WRITE</constant></entry> <entry> Used with <function>stream_filter_append</function> and <function>stream_filter_prepend</function> to indicate @@ -32,27 +32,27 @@ </entry> </row> <row xml:id="constant.stream-filter-all"> - <entry><constant>STREAM_FILTER_ALL</constant> *</entry> + <entry><constant>STREAM_FILTER_ALL</constant></entry> <entry> This constant is equivalent to <code>STREAM_FILTER_READ | STREAM_FILTER_WRITE</code> </entry> </row> <row xml:id="constant.psfs-pass-on"> - <entry><constant>PSFS_PASS_ON</constant> *</entry> + <entry><constant>PSFS_PASS_ON</constant></entry> <entry><literal>Return Code</literal> indicating that the userspace filter returned buckets in <parameter>$out</parameter>. </entry> </row> <row xml:id="constant.psfs-feed-me"> - <entry><constant>PSFS_FEED_ME</constant> *</entry> + <entry><constant>PSFS_FEED_ME</constant></entry> <entry><literal>Return Code</literal> indicating that the userspace filter did not return buckets in <parameter>$out</parameter> (i.e. No data available). </entry> </row> <row xml:id="constant.psfs-err-fatal"> - <entry><constant>PSFS_ERR_FATAL</constant> *</entry> + <entry><constant>PSFS_ERR_FATAL</constant></entry> <entry><literal>Return Code</literal> indicating that the userspace filter encountered an unrecoverable error (i.e. Invalid data received). @@ -85,32 +85,32 @@ </entry> </row> <row xml:id="constant.stream-client-async-connect"> - <entry><constant>STREAM_CLIENT_ASYNC_CONNECT</constant> *</entry> + <entry><constant>STREAM_CLIENT_ASYNC_CONNECT</constant></entry> <entry>Open client socket asynchronously. This option must be used together with the <constant>STREAM_CLIENT_CONNECT</constant> flag. Used with <function>stream_socket_client</function>. </entry> </row> <row xml:id="constant.stream-client-connect"> - <entry><constant>STREAM_CLIENT_CONNECT</constant> *</entry> + <entry><constant>STREAM_CLIENT_CONNECT</constant></entry> <entry>Open client socket connection. Client sockets should always include this flag. Used with <function>stream_socket_client</function>. </entry> </row> <row xml:id="constant.stream-client-persistent"> - <entry><constant>STREAM_CLIENT_PERSISTENT</constant> *</entry> + <entry><constant>STREAM_CLIENT_PERSISTENT</constant></entry> <entry>Client socket opened with <function>stream_socket_client</function> should remain persistent between page loads. </entry> </row> <row xml:id="constant.stream-server-bind"> - <entry><constant>STREAM_SERVER_BIND</constant> *</entry> + <entry><constant>STREAM_SERVER_BIND</constant></entry> <entry>Tells a stream created with <function>stream_socket_server</function> to bind to the specified target. Server sockets should always include this flag. </entry> </row> <row xml:id="constant.stream-server-listen"> - <entry><constant>STREAM_SERVER_LISTEN</constant> *</entry> + <entry><constant>STREAM_SERVER_LISTEN</constant></entry> <entry>Tells a stream created with <function>stream_socket_server</function> and bound using the <constant>STREAM_SERVER_BIND</constant> flag to start listening on the socket. Connection-orientated transports (such as TCP) @@ -119,7 +119,7 @@ </entry> </row> <row xml:id="constant.stream-notify-resolve"> - <entry><constant>STREAM_NOTIFY_RESOLVE</constant> *</entry> + <entry><constant>STREAM_NOTIFY_RESOLVE</constant></entry> <entry> A remote address required for this stream has been resolved, or the resolution failed. See <parameter>severity</parameter> for an indication of which happened. @@ -169,7 +169,7 @@ </entry> </row> <row xml:id="constant.stream-notify-completed"> - <entry><constant>STREAM_NOTIFY_COMPLETED</constant> *</entry> + <entry><constant>STREAM_NOTIFY_COMPLETED</constant></entry> <entry> There is no more data available on the stream. </entry> @@ -365,12 +365,6 @@ </para> <note> <simpara> - The constants marked with <literal>*</literal> are just available since - PHP 5.0.0. - </simpara> - </note> - <note> - <simpara> The constants marked with <literal>+</literal> are available since PHP 5.1.0 and are meant to be used with <function>stream_socket_pair</function>. Please note that some of these => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89581 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89581 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/fopen.xml By: girgias on 2019-02-07 09:56:44 =================================================================== --- en/reference/filesystem/functions/fopen.xml +++ en/reference/filesystem/functions/fopen.xml @@ -315,16 +315,6 @@ added </entry> </row> - <row> - <entry>4.3.2</entry> - <entry> - As of PHP 4.3.2, the default mode is set to binary for all platforms - that distinguish between binary and text mode. If you are having - problems with your scripts after upgrading, try using the - <literal>'t'</literal> flag as a workaround until you have made your - script more portable as mentioned before - </entry> - </row> </tbody> </tgroup> </informaltable> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89583 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89583 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/copy.xml By: girgias on 2019-02-07 09:59:55 =================================================================== --- en/reference/filesystem/functions/copy.xml +++ en/reference/filesystem/functions/copy.xml @@ -95,14 +95,6 @@ Added context support. </entry> </row> - <row> - <entry>4.3.0</entry> - <entry> - Both <parameter>source</parameter> and <parameter>dest</parameter> - may now be URLs if the "fopen wrappers" have been enabled. - See <function>fopen</function> for more details. - </entry> - </row> </tbody> </tgroup> </informaltable> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89584 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89584 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/dirname.xml By: girgias on 2019-02-07 10:00:11 =================================================================== --- en/reference/filesystem/functions/dirname.xml +++ en/reference/filesystem/functions/dirname.xml @@ -95,12 +95,6 @@ Added the optional <parameter>levels</parameter> parameter. </entry> </row> - <row> - <entry>5.0.0</entry> - <entry> - <function>dirname</function> is now binary safe - </entry> - </row> </tbody> </tgroup> </informaltable> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89585 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89585 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/fgetcsv.xml By: girgias on 2019-02-07 10:03:50 =================================================================== --- en/reference/filesystem/functions/fgetcsv.xml +++ en/reference/filesystem/functions/fgetcsv.xml @@ -159,12 +159,6 @@ --> </entry> </row> - <row> - <entry>4.3.5</entry> - <entry> - <function>fgetcsv</function> is now binary safe - </entry> - </row> </tbody> </tgroup> </informaltable> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89586 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89586 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/fgets.xml By: girgias on 2019-02-07 10:04:36 =================================================================== --- en/reference/filesystem/functions/fgets.xml +++ en/reference/filesystem/functions/fgets.xml @@ -63,30 +63,6 @@ </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>4.3.0</entry> - <entry> - <function>fgets</function> is now binary safe - </entry> - </row> - </tbody> - </tgroup> - </informaltable> - </para> - </refsect1> - <refsect1 role="examples"> &reftitle.examples; <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89587 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89587 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/file.xml By: girgias on 2019-02-07 10:05:28 =================================================================== --- en/reference/filesystem/functions/file.xml +++ en/reference/filesystem/functions/file.xml @@ -119,30 +119,6 @@ does not exist. </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>4.3.0</entry> - <entry> - <function>file</function> became binary safe - </entry> - </row> - </tbody> - </tgroup> - </informaltable> - </para> - </refsect1> <refsect1 role="examples"> &reftitle.examples; => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89588 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89588 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/parse-ini-file.xml By: girgias on 2019-02-07 10:13:51 =================================================================== --- en/reference/filesystem/functions/parse-ini-file.xml +++ en/reference/filesystem/functions/parse-ini-file.xml @@ -120,19 +120,6 @@ evaluated as hexadecimals. </entry> </row> - <row> - <entry>5.0.0</entry> - <entry> - Values enclosed in double quotes can contain new lines. - </entry> - </row> - <row> - <entry>4.2.1</entry> - <entry> - This function is now affected by &safemode; - and <link linkend="ini.open-basedir">open_basedir</link>. - </entry> - </row> </tbody> </tgroup> </informaltable> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89589 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89589 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/rename.xml By: girgias on 2019-02-07 10:15:14 =================================================================== --- en/reference/filesystem/functions/rename.xml +++ en/reference/filesystem/functions/rename.xml @@ -87,26 +87,6 @@ Windows. </entry> </row> - <row> - <entry>5.0.0</entry> - <entry> - <function>rename</function> can now also be used with - <emphasis>some</emphasis> URL wrappers. Refer to <xref - linkend="wrappers"/> for a listing of which wrappers - support <function>rename</function>. - </entry> - </row> - <row> - <entry>4.3.3</entry> - <entry> - <function>rename</function> may now be able to rename files across - partitions on *nix based systems, provided the appropriate permissions - are held. Warnings may be generated if the destination filesystem - doesn't permit <literal>chown()</literal> or - <literal>chmod()</literal> system calls to be made on files — - for example, if the destination filesystem is a FAT filesystem. - </entry> - </row> </tbody> </tgroup> </informaltable> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89590 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89590 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/rmdir.xml By: girgias on 2019-02-07 10:15:38 =================================================================== --- en/reference/filesystem/functions/rmdir.xml +++ en/reference/filesystem/functions/rmdir.xml @@ -49,33 +49,6 @@ </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>5.0.0</entry> - <entry> - As of PHP 5.0.0 <function>rmdir</function> can also be used with - <emphasis>some</emphasis> URL wrappers. Refer to <xref - linkend="wrappers"/> for a listing of which wrappers support - <function>rmdir</function>. - </entry> - </row> - </tbody> - </tgroup> - </informaltable> - </para> - </refsect1> - <refsect1 role="examples"> &reftitle.examples; <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89591 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89591 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/tempnam.xml By: girgias on 2019-02-07 10:16:29 =================================================================== --- en/reference/filesystem/functions/tempnam.xml +++ en/reference/filesystem/functions/tempnam.xml @@ -58,35 +58,6 @@ </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>4.0.3</entry> - <entry> - This function's behavior changed in 4.0.3. The temporary file is also - created to avoid a race condition where the file might appear in the - filesystem between the time the string was generated and before - the script gets around to creating the file. Note, that you need - to remove the file in case you need it no more, it is not done - automatically. - </entry> - </row> - </tbody> - </tgroup> - </informaltable> - </para> - </refsect1> - <refsect1 role="examples"> &reftitle.examples; <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89592 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89592 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/unlink.xml By: girgias on 2019-02-07 10:17:06 =================================================================== --- en/reference/filesystem/functions/unlink.xml +++ en/reference/filesystem/functions/unlink.xml @@ -49,33 +49,6 @@ </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>5.0.0</entry> - <entry> - As of PHP 5.0.0 <function>unlink</function> can also be used with - <emphasis>some</emphasis> URL wrappers. Refer to <xref - linkend="wrappers"/> for a listing of which wrappers support - <function>unlink</function>. - </entry> - </row> - </tbody> - </tgroup> - </informaltable> - </para> - </refsect1> - <refsect1 role="examples"> &reftitle.examples; <para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89593 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89593 ------------------------------------------------------------------ Modified: en/reference/stream/functions/stream-set-timeout.xml By: girgias on 2019-02-07 10:25:26 =================================================================== --- en/reference/stream/functions/stream-set-timeout.xml +++ en/reference/stream/functions/stream-set-timeout.xml @@ -64,33 +64,6 @@ &return.success; </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>4.3.0</entry> - <entry> - As of PHP 4.3, this function can (potentially) work on any kind of - stream. In PHP 4.3, socket based streams are still the only kind - supported in the PHP core, although streams from other extensions - may support this function. - </entry> - </row> - </tbody> - </tgroup> - </informaltable> - </para> - </refsect1> <refsect1 role="examples"> &reftitle.examples; => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89595 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89595 ------------------------------------------------------------------ Modified: en/reference/session/functions/session-regenerate-id.xml By: girgias on 2019-02-07 10:44:24 =================================================================== --- en/reference/session/functions/session-regenerate-id.xml +++ en/reference/session/functions/session-regenerate-id.xml @@ -92,14 +92,6 @@ Added the <parameter>delete_old_session</parameter> parameter. </entry> </row> - <row> - <entry>4.3.3</entry> - <entry> - Since then, if session cookies are enabled, use of - <function>session_regenerate_id</function> will also submit a new - session cookie with the new session id. - </entry> - </row> </tbody> </tgroup> </informaltable> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89596 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89596 ------------------------------------------------------------------ Modified: en/reference/session/functions/session-start.xml By: girgias on 2019-02-07 10:45:28 =================================================================== --- en/reference/session/functions/session-start.xml +++ en/reference/session/functions/session-start.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 346848 $ --> +<!-- $Revision: 344212 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.session-start"> <refnamediv> <refname>session_start</refname> @@ -109,15 +109,6 @@ Previously &true; was returned. </entry> </row> - <row> - <entry>4.3.3</entry> - <entry> - As of PHP 4.3.3, calling <function>session_start</function> - after the session was previously started will result in an - error of level <constant>E_NOTICE</constant>. Also, the - second session start will simply be ignored. - </entry> - </row> </tbody> </tgroup> </informaltable> @@ -227,7 +218,7 @@ <note> <para> To use cookie-based sessions, <function>session_start</function> - must be called before outputting anything to the browser. + must be called before outputing anything to the browser. </para> </note> <note> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89598 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89598 ------------------------------------------------------------------ Modified: en/reference/mbstring/functions/mb-strlen.xml By: anonymous on 2019-02-07 20:14:43 =================================================================== --- en/reference/mbstring/functions/mb-strlen.xml +++ en/reference/mbstring/functions/mb-strlen.xml @@ -48,10 +48,14 @@ <parameter>encoding</parameter>. A multi-byte character is counted as 1. </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; <para> - Returns &false; if the given <parameter>encoding</parameter> is invalid. + If the encoding is unknown, an error of level + <constant>E_WARNING</constant> is generated. </para> - &return.falseproblem; </refsect1> <refsect1 role="seealso"> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89599 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89599 ------------------------------------------------------------------ Modified: en/reference/array/functions/array-map.xml By: girgias on 2019-02-12 14:57:21 =================================================================== --- en/reference/array/functions/array-map.xml +++ en/reference/array/functions/array-map.xml @@ -15,13 +15,14 @@ <methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam> </methodsynopsis> <para> - <function>array_map</function> returns an array containing all - the elements of <parameter>array1</parameter> after applying the - <parameter>callback</parameter> function to each one. + <function>array_map</function> returns an array containing + the results of applying the <parameter>callback</parameter> + function to the corresponding index of <parameter>array1</parameter> + (and <parameter>...</parameter> if more arrays are provided) + used as arguments for the callback. The number of parameters that the <parameter>callback</parameter> - function accepts - should match the number of arrays - passed to the <function>array_map</function> + function accepts should match the number of arrays + passed to <function>array_map</function>. </para> </refsect1> @@ -49,7 +50,7 @@ <term><parameter>...</parameter></term> <listitem> <para> - Variable list of array arguments to run through the + Supplementary variable list of array arguments to run through the <parameter>callback</parameter> function. </para> </listitem> @@ -61,8 +62,10 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns an array containing all the elements of <parameter>array1</parameter> - after applying the <parameter>callback</parameter> function to each one. + Returns an array containing the results of applying the <parameter>callback</parameter> + function to the corresponding index of <parameter>array1</parameter> + (and <parameter>...</parameter> if more arrays are provided) + used as arguments for the callback. </para> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89216 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89216 ------------------------------------------------------------------ Modified: en/reference/strings/functions/sprintf.xml By: girgias on 2019-02-12 19:59:18 =================================================================== --- en/reference/strings/functions/sprintf.xml +++ en/reference/strings/functions/sprintf.xml @@ -31,140 +31,245 @@ ordinary characters (excluding <literal>%</literal>) that are copied directly to the result and <emphasis>conversion specifications</emphasis>, each of which results in fetching its - own parameter. This applies to both <function>sprintf</function> - and <function>printf</function>. + own parameter. </para> + <para> - Each conversion specification consists of a percent sign - (<literal>%</literal>), followed by one or more of these - elements, in order: - <orderedlist> - <listitem> - <simpara> - An optional <emphasis>sign specifier</emphasis> that forces a sign - (- or +) to be used on a number. By default, only the - sign is used - on a number if it's negative. This specifier forces positive numbers - to have the + sign attached as well. - </simpara> - </listitem> - <listitem> - <simpara> - An optional <emphasis>padding specifier</emphasis> that says - what character will be used for padding the results to the - right string size. This may be a space character or a - <literal>0</literal> (zero character). The default is to pad - with spaces. An alternate padding character can be specified - by prefixing it with a single quote (<literal>'</literal>). - See the examples below. - </simpara> - </listitem> - <listitem> - <simpara> - An optional <emphasis>alignment specifier</emphasis> that says - if the result should be left-justified or right-justified. - The default is right-justified; a <literal>-</literal> - character here will make it left-justified. - </simpara> - </listitem> - <listitem> - <simpara> - An optional number, a <emphasis>width specifier</emphasis> - that says how many characters (minimum) this conversion should - result in. - </simpara> - </listitem> - <listitem> + A conversion specification follows this prototype: + <literal>%[flags][width][.precision]specifier</literal>. + </para> + + <para> + <table> + <title>Flags</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Flag</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>-</literal></entry> + <entry> + Left-justify within the given field width; + Right justification is the default + </entry> + </row> + <row> + <entry><literal>+</literal></entry> + <entry> + Prefix positive numbers with a plus sign + <literal>+</literal>; Default only negative + are prefixed with a negative sign. + </entry> + </row> + <row> + <entry><literal> </literal>(space)</entry> + <entry> + Pads the result with spaces. + This is the default. + </entry> + </row> + <row> + <entry><literal>0</literal></entry> + <entry> + Only left-pads numbers with zeros. + With <literal>s</literal> specifiers this can + also right-pad with zeros. + </entry> + </row> + <row> + <entry><literal>'</literal>(char)</entry> + <entry> + Pads the result with the character (char). + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + + <formalpara> + <title>Width</title> + <para> + An integer that says how many characters (minimum) + this conversion should result in. + </para> + </formalpara> + + <formalpara> + <title>Precision</title> + <para> + A period <literal>.</literal> followed by an integer + who's meaning depends on the specifier: + <itemizedlist> + <listitem> + <simpara> + For <literal>e</literal>, <literal>E</literal>, + <literal>f</literal> and <literal>F</literal> + specifiers: this is the number of digits to be printed + after the decimal point (by default, this is 6). + </simpara> + </listitem> + <listitem> + <simpara> + For <literal>g</literal> and <literal>G</literal> + specifiers: this is the maximum number of significant + digits to be printed. + </simpara> + </listitem> + <listitem> + <simpara> + For <literal>s</literal> specifier: it acts as a cutoff point, + setting a maximum character limit to the string. + </simpara> + </listitem> + </itemizedlist> + <note> <simpara> - An optional <emphasis>precision specifier</emphasis> in the form - of a period (<literal>.</literal>) followed by an optional decimal digit string - that says how many decimal digits should be displayed for - floating-point numbers. When using this specifier on a string, - it acts as a cutoff point, setting a maximum character limit to - the string. Additionally, the character to use when padding a - number may optionally be specified between the period and the - digit. + If the period is specified without an explicit value for precision, + 0 is assumed. </simpara> - </listitem> - <listitem> - <para> - A <emphasis>type specifier</emphasis> that says what type the - argument data should be treated as. Possible types: - <simplelist> - <member> - <literal>%</literal> - a literal percent character. No - argument is required. - </member> - <member> - <literal>b</literal> - the argument is treated as an - integer and presented as a binary number. - </member> - <member> - <literal>c</literal> - the argument is treated as an - integer and presented as the character with that ASCII - value. - </member> - <member> - <literal>d</literal> - the argument is treated as an - integer and presented as a (signed) decimal number. - </member> - <member> - <literal>e</literal> - the argument is treated as scientific - notation (e.g. 1.2e+2). + </note> + </para> + </formalpara> + + <para> + <table> + <title>Specifiers</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Specifier</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>%</literal></entry> + <entry> + A literal percent character. No argument is required. + </entry> + </row> + <row> + <entry><literal>b</literal></entry> + <entry> + The argument is treated as an integer and presented + as a binary number. + </entry> + </row> + <row> + <entry><literal>c</literal></entry> + <entry> + The argument is treated as an integer and presented + as the character with that ASCII. + </entry> + </row> + <row> + <entry><literal>d</literal></entry> + <entry> + The argument is treated as an integer and presented + as a (signed) decimal number. + </entry> + </row> + <row> + <entry><literal>e</literal></entry> + <entry> + The argument is treated as scientific notation (e.g. 1.2e+2). The precision specifier stands for the number of digits after the decimal point since PHP 5.2.1. In earlier versions, it was taken as number of significant digits (one less). - </member> - <member> - <literal>E</literal> - like <literal>%e</literal> but uses + </entry> + </row> + <row> + <entry><literal>E</literal></entry> + <entry> + Like the <literal>e</literal> specifier but uses uppercase letter (e.g. 1.2E+2). - </member> - <member> - <literal>f</literal> - the argument is treated as a - float and presented as a floating-point number (locale aware). - </member> - <member> - <literal>F</literal> - the argument is treated as a - float and presented as a floating-point number (non-locale aware). - Available since PHP 5.0.3. - </member> - <member> - <literal>g</literal> - shorter of <literal>%e</literal> and - <literal>%f</literal>. - </member> - <member> - <literal>G</literal> - shorter of <literal>%E</literal> and - <literal>%F</literal>. - </member> - <member> - <literal>o</literal> - the argument is treated as an - integer and presented as an octal number. - </member> - <member> - <literal>s</literal> - the argument is treated as and - presented as a string. - </member> - <member> - <literal>u</literal> - the argument is treated as an - integer and presented as an unsigned decimal number. - </member> - <member> - <literal>x</literal> - the argument is treated as an integer - and presented as a hexadecimal number (with lowercase - letters). - </member> - <member> - <literal>X</literal> - the argument is treated as an integer - and presented as a hexadecimal number (with uppercase - letters). - </member> - </simplelist> - </para> - </listitem> - </orderedlist> + </entry> + </row> + <row> + <entry><literal>f</literal></entry> + <entry> + The argument is treated as a float and presented + as a floating-point number (locale aware). + </entry> + </row> + <row> + <entry><literal>F</literal></entry> + <entry> + The argument is treated as a float and presented + as a floating-point number (non-locale aware). + Available as of PHP 5.0.3. + </entry> + </row> + <row> + <entry><literal>g</literal></entry> + <entry> + <para> + General format. + </para> + <para> + Let P equal the precision if nonzero, 6 if the precision is omitted, + or 1 if the precision is zero. + Then, if a conversion with style E would have an exponent of X: + </para> + <para> + If P > X ≥ −4, the conversion is with style f and precision P − (X + 1). + Otherwise, the conversion is with style e and precision P − 1. + </para> + </entry> + </row> + <row> + <entry><literal>G</literal></entry> + <entry> + Like the <literal>g</literal> specifier but uses + <literal>E</literal> and <literal>F</literal>. + </entry> + </row> + <row> + <entry><literal>o</literal></entry> + <entry> + The argument is treated as an integer and presented + as an octal number. + </entry> + </row> + <row> + <entry><literal>s</literal></entry> + <entry> + the argument is treated and presented as a string. + </entry> + </row> + <row> + <entry><literal>x</literal></entry> + <entry> + The argument is treated as an integer and presented + as a hexadecimal number (with lowercase letters). + </entry> + </row> + <row> + <entry><literal>X</literal></entry> + <entry> + The argument is treated as an integer and presented + as a hexadecimal number (with uppercase letters). + </entry> + </row> + </tbody> + </tgroup> + </table> </para> + + <warning> + <para> + The <literal>c</literal> type specifier ignores padding and width + </para> + </warning> + <para> Variables will be co-erced to a suitable type for the specifier: - <table xml:id="sprintf.coercion"> + <table> <title>Type Handling</title> <tgroup cols="2"> <thead> @@ -205,11 +310,13 @@ </tgroup> </table> </para> + <warning> <para> Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results </para> </warning> + <para> The format string supports argument numbering/swapping. Here is an example: @@ -319,11 +426,6 @@ <function>sprintf</function> generating warnings. </para> </note> - <warning> - <para> - The <literal>c</literal> type specifier ignores padding and width - </para> - </warning> </listitem> </varlistentry> <varlistentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89713 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89713 ------------------------------------------------------------------ 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/isiterateable.xml By: Florian Berberich on 2019-02-17 03:36:25 =================================================================== --- en/reference/reflection/reflectionclass/isiterateable.xml +++ en/reference/reflection/reflectionclass/isiterateable.xml @@ -1,18 +1,126 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 346865 $ --> +<!-- $Revision: 294409 $ --> <refentry xml:id="reflectionclass.isiterateable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>ReflectionClass::isIterateable</refname> - <refpurpose>&Alias; <methodname>ReflectionClass::isIterable</methodname></refpurpose> + <refpurpose>Checks if iterateable</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; - <para>&Alias; <methodname>ReflectionClass::isIterable</methodname></para> + <methodsynopsis> + <modifier>public</modifier> <type>bool</type><methodname>ReflectionClass::isIterateable</methodname> + <void /> + </methodsynopsis> <para> - As of PHP 7.2.0, instead of the missspelled <methodname>RefectionClass::isIterateable</methodname>, - <methodname>ReflectionClass::isIterable</methodname> should be preferred. + Checks whether the class implements the interface <interfacename>Traversable</interfacename>. + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <title>Alias of <methodname>ReflectionClass::isIterable</methodname></title> + <simpara> + Since PHP 7.2.0 this method is an alias of <methodname>ReflectionClass::isIterable</methodname>. + For the behavior of this method since PHP 7.2.0 visit + <linked link="reflectionclass.isiterable">ReflectionClass::isIterable</linked> + </simpara> + </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </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> + This method is now an alias of <linked link="reflectionclass.isiterable"> + ReflectionClass::isIterable</linked> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><methodname>ReflectionClass::isIterateable</methodname> example</title> + <programlisting role="php"> +<![CDATA[ +<?php + +abstract class IteratorClass implements Iterator { + public function __construct() { } + public function key() { } + public function current() { } + function next() { } + function valid() { } + function rewind() { } +} +class DerivedClass extends IteratorClass { } +class NonIterator { } + +function dump_iterateable($class) { + $reflection = new ReflectionClass($class); + var_dump($reflection->isIterateable()); +} + +$classes = array("ArrayObject", "IteratorClass", "DerivedClass", "NonIterator"); + +foreach ($classes as $class) { + echo "Is $class iterateable? "; + dump_iterateable($class); +} +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Is ArrayObject iterateable? bool(true) +Is IteratorClass iterateable? bool(true) +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> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89790 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89790 ------------------------------------------------------------------ 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/strings/functions/strrpos.xml By: Florian Berberich on 2019-02-17 05:52:29 =================================================================== --- en/reference/strings/functions/strrpos.xml +++ en/reference/strings/functions/strrpos.xml @@ -41,10 +41,15 @@ <varlistentry> <term><parameter>offset</parameter></term> <listitem> + <para> + If specified and positive, the search will stop this number of characters + counted from the beginning of the string, starting at the string's last + character. + </para> <para> - If specified, search will start this number of characters counted from the - beginning of the string. If the value is negative, search will instead start - from that many characters from the end of the string, searching backwards. + If specified and negative, the search will start looking for the needle + at the given position from the end of the string, stopping at the + string's frist character. </para> </listitem> </varlistentry> @@ -56,8 +61,7 @@ &reftitle.returnvalues; <para> Returns the position where the needle exists relative to the beginning of - the <parameter>haystack</parameter> string (independent of search direction - or offset). + the <parameter>haystack</parameter> string (independent of the offset). Also note that string positions start at 0, and not 1. </para> <para> @@ -130,6 +134,12 @@ // string. Result: int(27) var_dump(strrpos($foo, '7', 28)); // Result: bool(false) + +var_dump(strrpos($foo, 'c', -2)); // Result: bool(false) as the needle can + // not start two characters from the right + +var_dump(strrpos($foo, '9c', -2)); // Result: int(29) as the needle starts + // two characters from the right ?> ]]> </programlisting> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89795 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89795 ------------------------------------------------------------------ Modified: en/reference/info/functions/php-sapi-name.xml By: Edgaras Janušauskas on 2019-02-22 04:14:53 =================================================================== --- en/reference/info/functions/php-sapi-name.xml +++ en/reference/info/functions/php-sapi-name.xml @@ -34,7 +34,7 @@ <literal>cgi-fcgi</literal>, <literal>cli</literal>, <literal>cli-server</literal>, <literal>continuity</literal>, <literal>embed</literal>, <literal>fpm-fcgi</literal>, <literal>isapi</literal>, <literal>litespeed</literal>, - <literal>milter</literal>, <literal>nsapi</literal>, + <literal>milter</literal>, <literal>nsapi</literal>, <literal>phpdbg</literal>, <literal>phttpd</literal>, <literal>pi3web</literal>, <literal>roxen</literal>, <literal>thttpd</literal>, <literal>tux</literal>, and <literal>webjames</literal>. </para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=89912 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=89912 ------------------------------------------------------------------ -- https://edit.php.net/ This email is send automatically by the Php Docbook Online Editor.

« previous php.doc (#969387180) next »