Contributions are ready for review

From: Date: Mon, 05 Nov 2012 13:00:05 +0000
Subject: Contributions are ready for review
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969384133@lists.php.net to get a copy of this message
Hello PHP EN Documentation team, There are contributions within the online editor queue for this language. Please review, then commit or delete these patches. Patches for review : ----------------------- Modified: en/reference/session/examples.xml By: Victor BERCHET on 2012-05-08 06:26:08 =================================================================== --- en/reference/session/examples.xml +++ en/reference/session/examples.xml @@ -29,8 +29,7 @@ <para> Sessions can be started manually using the <function>session_start</function> function, and if the <link linkend="ini.session.auto-start">session.auto_start</link> directive is set - to <parameter>1</parameter>, a session will automatically start the moment PHP sends any output - to the output buffer. + to <parameter>1</parameter>, a session will automatically start on request startup. </para> <para> Sessions normally shutdown automatically when PHP is finished executing a script, but can be => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=36755 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=36755 ------------------------------------------------------------------ Modified: en/reference/mysqli/constants.xml By: anonymous on 2012-08-06 22:08:26 =================================================================== --- en/reference/mysqli/constants.xml +++ en/reference/mysqli/constants.xml @@ -447,7 +447,7 @@ <term><constant>MYSQLI_TYPE_STRING</constant></term> <listitem> <para> - Field is defined as <literal>STRING</literal> + Field is defined as <literal>CHAR</literal> or <literal>BINARY</literal> </para> </listitem> </varlistentry> @@ -455,7 +455,7 @@ <term><constant>MYSQLI_TYPE_CHAR</constant></term> <listitem> <para> - Field is defined as <literal>CHAR</literal> + Field is outdated, for <literal>CHAR</literal> see <literal>MYSQLI_TYPE_STRING</literal> </para> </listitem> </varlistentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=39294 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=39294 ------------------------------------------------------------------ Modified: en/language/variables.xml By: anonymous on 2012-08-23 23:36:57 =================================================================== --- en/language/variables.xml +++ en/language/variables.xml @@ -913,7 +913,8 @@ The <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> configuration directive affects Get, Post and Cookie values. If turned on, value (It's "PHP!") will automagically become (It's "PHP!"). - Escaping is needed for DB insertion. See also + It was deemed that this was needed for escaping for DB insertion circa a + decade ago and is a legacy feature now that should be disabled. See also <function>addslashes</function>, <function>stripslashes</function> and <link linkend="ini.magic-quotes-sybase">magic_quotes_sybase</link>. </para> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=39566 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=39566 ------------------------------------------------------------------ Modified: en/reference/datetime/functions/microtime.xml By: Dejan Marjanovic on 2012-08-26 03:29:42 =================================================================== --- en/reference/datetime/functions/microtime.xml +++ en/reference/datetime/functions/microtime.xml @@ -126,6 +126,23 @@ ]]> </programlisting> </example> + <example> + <title>Timing script execution in PHP 5.4+</title> + <programlisting role="php"> +<![CDATA[ +<?php +// Randomize sleeping time +usleep(mt_rand(100,10000)); + +// As of PHP 5.4 REQUEST_TIME_FLOAT is always available in $_SERVER superglobal. +// It contains the timestamp of the start of the request, with microsecond precision. +$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"]; + +echo "Did nothing in $time secondsn"; +?> +]]> + </programlisting> + </example> </para> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=39632 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=39632 ------------------------------------------------------------------ Modified: en/reference/datetime/dateinterval.xml By: rdohms on 2012-08-30 00:47:05 =================================================================== --- en/reference/datetime/dateinterval.xml +++ en/reference/datetime/dateinterval.xml @@ -153,8 +153,9 @@ <listitem> <para> Is <literal>1</literal> if the interval is inverted and - <literal>0</literal> otherwise. See - <methodname>DateInterval::format</methodname>. + <literal>0</literal> otherwise. This means a date with inverted + set to <literal>1</literal> is actually a negative time period. + See <methodname>DateInterval::format</methodname>. </para> </listitem> </varlistentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=39769 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=39769 ------------------------------------------------------------------ Modified: en/reference/datetime/datetime/diff.xml By: rdohms on 2012-08-30 00:48:53 =================================================================== --- en/reference/datetime/datetime/diff.xml +++ en/reference/datetime/datetime/diff.xml @@ -43,7 +43,7 @@ <term><parameter>absolute</parameter></term> <listitem> <para> - Whether to return absolute difference. + Whether to return absolute difference. (Periods will not carry information about being positive or negative) </para> </listitem> </varlistentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=39770 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=39770 ------------------------------------------------------------------ Modified: en/reference/classobj/book.xml By: anonymous on 2012-09-08 20:08:06 =================================================================== --- en/reference/classobj/book.xml +++ en/reference/classobj/book.xml @@ -17,6 +17,11 @@ class membership of an object, but also its parentage (i.e. what class is the object class extending). </para> + <para> + Please see the <link linkend="language.types.object">Objects</link> + section of the manual for a detailed explanation of how classes and + objects are implemented and used in PHP. + </para> </preface> &reference.classobj.setup; => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=40081 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=40081 ------------------------------------------------------------------ Modified: en/reference/var/functions/is-string.xml By: Hans Henrik Bergan on 2012-09-12 10:00:34 =================================================================== --- en/reference/var/functions/is-string.xml +++ en/reference/var/functions/is-string.xml @@ -45,26 +45,43 @@ <programlisting role="php"> <![CDATA[ <?php -if (is_string("23")) { - echo "is stringn"; -} else { - echo "is not a stringn"; +function f($i){ +echo 'is_string('; +var_export($i,false); +echo ') = '; +var_dump(is_string($i)); } -var_dump(is_string('abc')); -var_dump(is_string("23")); -var_dump(is_string(23.5)); -var_dump(is_string(true)); +f(false); +f(true); +f(null); +f('abc'); +f('23'); +f(23); +f('23.5'); +f(23.5); +f(''); +f(' '); +f('0'); +f(0); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ -is string -bool(true) -bool(true) -bool(false) -bool(false) +is_string(false) = bool(false) +is_string(true) = bool(false) +is_string(NULL) = bool(false) +is_string('abc') = bool(true) +is_string('23') = bool(true) +is_string(23) = bool(false) +is_string('23.5') = bool(true) +is_string(23.5) = bool(false) +is_string('') = bool(true) +is_string(' ') = bool(true) +is_string('0') = bool(true) +is_string(0) = bool(false) + ]]> </screen> </example> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=40266 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=40266 ------------------------------------------------------------------ Modified: en/reference/image/functions/imagecopymergegray.xml By: anonymous on 2012-09-15 14:43:15 =================================================================== --- en/reference/image/functions/imagecopymergegray.xml +++ en/reference/image/functions/imagecopymergegray.xml @@ -101,8 +101,9 @@ The <parameter>src_im</parameter> will be changed to grayscale according to <parameter>pct</parameter> where 0 is fully grayscale and 100 is unchanged. When <parameter>pct</parameter> = 100 this function behaves - identically to <function>imagecopy</function> for pallete images, while - it implements alpha transparency for true colour images. + identically to <function>imagecopy</function> for pallete images, except + for ignoring alpha components, while it implements alpha transparency + for true colour images. </para> </listitem> </varlistentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=40349 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=40349 ------------------------------------------------------------------ Modified: en/reference/image/functions/imagecopymerge.xml By: anonymous on 2012-09-15 14:43:39 =================================================================== --- en/reference/image/functions/imagecopymerge.xml +++ en/reference/image/functions/imagecopymerge.xml @@ -96,8 +96,9 @@ The two images will be merged according to <parameter>pct</parameter> which can range from 0 to 100. When <parameter>pct</parameter> = 0, no action is taken, when 100 this function behaves identically - to <function>imagecopy</function> for pallete images, while it - implements alpha transparency for true colour images. + to <function>imagecopy</function> for pallete images, except for + ignoring alpha components, while it implements alpha transparency + for true colour images. </para> </listitem> </varlistentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=40348 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=40348 ------------------------------------------------------------------ Modified: en/appendices/extensions.xml By: Niel Archer on 2012-10-02 14:19:08 =================================================================== --- en/appendices/extensions.xml +++ en/appendices/extensions.xml @@ -295,13 +295,13 @@ <listitem><para><xref linkend="book.fbsql"/></para></listitem> <listitem><para><xref linkend="book.fdf"/></para></listitem> <listitem><para><xref linkend="book.ftp"/></para></listitem> + <listitem><para><xref linkend="book.image"/></para></listitem> <listitem><para><xref linkend="book.gettext"/></para></listitem> <listitem><para><xref linkend="book.gmp"/></para></listitem> <listitem><para><xref linkend="book.hash"/></para></listitem> <listitem><para><xref linkend="book.ibase"/></para></listitem> <listitem><para><xref linkend="book.iconv"/></para></listitem> <listitem><para><xref linkend="book.ifx"/></para></listitem> - <listitem><para><xref linkend="book.image"/></para></listitem> <listitem><para><xref linkend="book.imap"/></para></listitem> <listitem><para><xref linkend="book.json"/></para></listitem> <listitem><para><xref linkend="book.ldap"/></para></listitem> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=41063 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=41063 ------------------------------------------------------------------ Modified: en/reference/sqlite3/sqlite3/construct.xml By: Niel Archer on 2012-10-02 15:04:38 =================================================================== --- en/reference/sqlite3/sqlite3/construct.xml +++ en/reference/sqlite3/sqlite3/construct.xml @@ -82,7 +82,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns an SQLite3 object on success. + Returns an SQLite3 object on success. Throws an exception on failure. </para> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=41064 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=41064 ------------------------------------------------------------------ Modified: en/reference/spl/splfileobject.xml By: Niel Archer on 2012-10-17 05:30:26 =================================================================== --- en/reference/spl/splfileobject.xml +++ en/reference/spl/splfileobject.xml @@ -69,7 +69,7 @@ <modifier>const</modifier> <type>integer</type> <varname linkend="splfileobject.constants.skip-empty">SplFileObject::SKIP_EMPTY</varname> - <initializer>6</initializer> + <initializer>4</initializer> </fieldsynopsis> <fieldsynopsis> <modifier>const</modifier> @@ -108,7 +108,7 @@ <varlistentry xml:id="splfileobject.constants.skip-empty"> <term><constant>SplFileObject::SKIP_EMPTY</constant></term> <listitem> - <para>Skips empty lines in the file.</para> + <para>Skips empty lines in the file. This requires the <constant>READ_AHEAD</constant> flag be enabled, to work as expected.</para> </listitem> </varlistentry> <varlistentry xml:id="splfileobject.constants.read-csv"> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42079 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42079 ------------------------------------------------------------------ Modified: en/reference/mysqlinfo/concepts.xml By: Simon Sattes on 2012-10-22 02:00:02 =================================================================== --- en/reference/mysqlinfo/concepts.xml +++ en/reference/mysqlinfo/concepts.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 328175 $ --> +<!-- $Revision: 326024 $ --> <chapter xml:id="mysqlinfo.concepts" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Concepts</title> <para> @@ -81,7 +81,7 @@ <![CDATA[ <?php $pdo = new PDO("mysql:host=localhost;dbname=world", 'my_user', 'my_pass'); -$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); +$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, FALSE); $uresult = $pdo->query("SELECT Name FROM City"); if ($uresult) { => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42261 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42261 ------------------------------------------------------------------ Modified: en/reference/math/functions/is-infinite.xml By: anonymous on 2012-10-28 19:13:26 =================================================================== --- en/reference/math/functions/is-infinite.xml +++ en/reference/math/functions/is-infinite.xml @@ -14,7 +14,7 @@ <para> Returns &true; if <parameter>val</parameter> is infinite (positive or negative), like the result of <literal>log(0)</literal> or any value too - big to fit into a float on this platform. + big to fit into a float on this platform, such as <literal>pow(9, pow(9,9))</literal>. </para> </refsect1> <refsect1 role="parameters"> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42359 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42359 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/symlink.xml By: Niel Archer on 2012-10-29 18:21:06 =================================================================== --- en/reference/filesystem/functions/symlink.xml +++ en/reference/filesystem/functions/symlink.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 328192 $ --> +<!-- $Revision: 297028 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.symlink"> <refnamediv> <refname>symlink</refname> @@ -100,9 +100,9 @@ &reftitle.notes; <note> <simpara> - Windows users should note that this function will only work if the system - you run PHP from is Windows Vista/Windows Server 2008 or newer. Windows - versions prior to that does not support symbolic links. + Windows users: This function will only work if the system you are + running PHP on is Windows Vista/Windows Server 2008 or later. + Windows versions prior to these do not support symbolic links. </simpara> </note> </refsect1> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42452 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42452 ------------------------------------------------------------------ Modified: en/reference/json/functions/json-encode.xml By: anonymous on 2012-10-31 09:57:37 =================================================================== --- en/reference/json/functions/json-encode.xml +++ en/reference/json/functions/json-encode.xml @@ -39,15 +39,55 @@ <term><parameter>options</parameter></term> <listitem> <para> - Bitmask consisting of <constant>JSON_HEX_QUOT</constant>, - <constant>JSON_HEX_TAG</constant>, - <constant>JSON_HEX_AMP</constant>, - <constant>JSON_HEX_APOS</constant>, - <constant>JSON_NUMERIC_CHECK</constant>, - <constant>JSON_PRETTY_PRINT</constant>, - <constant>JSON_UNESCAPED_SLASHES</constant>, - <constant>JSON_FORCE_OBJECT</constant>, - <constant>JSON_UNESCAPED_UNICODE</constant>. + Bitmask consisting of the following values: + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>Constant</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><constant>JSON_HEX_QUOT</constant></entry> + <entry>Encodes <literal>"</literal> as <literal>u0022</literal></entry> + </row> + <row> + <entry><constant>JSON_HEX_TAG</constant></entry> + <entry>Encodes <literal>&lt;</literal> as <literal>u003C</literal> and <literal>&gt;</literal> as <literal>u003E</literal></entry> + </row> + <row> + <entry><constant>JSON_HEX_AMP</constant></entry> + <entry>Encodes <literal>&amp;</literal> as <literal>u0026</literal></entry> + </row> + <row> + <entry><constant>JSON_HEX_APOS</constant></entry> + <entry>Encodes <literal>'</literal> as <literal>u0027</literal></entry> + </row> + <row> + <entry><constant>JSON_NUMERIC_CHECK</constant></entry> + <entry>Encode numeric strings as numbers (default is to keep the value as a string)</entry> + </row> + <row> + <entry><constant>JSON_PRETTY_PRINT</constant></entry> + <entry>Pretty-print arrays and objects</entry> + </row> + <row> + <entry><constant>JSON_UNESCAPED_SLASHES</constant></entry> + <entry>Do not escape forward slashes (which are escaped by default)</entry> + </row> + <row> + <entry><constant>JSON_FORCE_OBJECT</constant></entry> + <entry>Always encode arrays as objects (default is to keep sequential arrays as JSON arrays)</entry> + </row> + <row> + <entry><constant>JSON_UNESCAPED_UNICODE</constant></entry> + <entry>Do not escape Unicode characters as <literal>uHHHH</literal></entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> </listitem> </varlistentry> @@ -125,15 +165,17 @@ <programlisting role="php"> <![CDATA[ <?php -$a = array('<foo>',"'bar'",'"baz"','&blong&', "xc3xa9"); +$a = array('<foo>',"'bar'",'"baz"','&blong&', '123.4', "xc3xa9", 'sl/ash'); echo "Normal: ", json_encode($a), "n"; echo "Tags: ", json_encode($a, JSON_HEX_TAG), "n"; echo "Apos: ", json_encode($a, JSON_HEX_APOS), "n"; echo "Quot: ", json_encode($a, JSON_HEX_QUOT), "n"; echo "Amp: ", json_encode($a, JSON_HEX_AMP), "n"; +echo "Numeric: ", json_encode($a, JSON_NUMERIC_CHECK), "n"; echo "Unicode: ", json_encode($a, JSON_UNESCAPED_UNICODE), "n"; -echo "All: ", json_encode($a, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE), "nn"; +echo "Slash: ", json_encode($a, JSON_UNESCAPED_SLASHES), "n"; +echo "All: ", json_encode($a, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), "nn"; $b = array(); @@ -149,19 +191,25 @@ echo "Associative array always output as object: ", json_encode($d), "n"; echo "Associative array always output as object: ", json_encode($d, JSON_FORCE_OBJECT), "nn"; + +$e = array('array' => array(1, 2, array(3)), 'string' => '4'); + +echo "Associative array pretty-printed: n", json_encode($e, JSON_PRETTY_PRINT), "nn"; ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ -Normal: ["<foo>","'bar'",""baz"","&blong&","u00e9"] -Tags: ["u003Cfoou003E","'bar'",""baz"","&blong&","u00e9"] -Apos: ["<foo>","u0027baru0027",""baz"","&blong&","u00e9"] -Quot: ["<foo>","'bar'","u0022bazu0022","&blong&","u00e9"] -Amp: ["<foo>","'bar'",""baz"","u0026blongu0026","u00e9"] -Unicode: ["<foo>","'bar'",""baz"","&blong&","é"] -All: ["u003Cfoou003E","u0027baru0027","u0022bazu0022","u0026blongu0026","é"] +Normal: ["<foo>","'bar'",""baz"","&blong&","123.4","u00e9","sl/ash"] +Tags: ["u003Cfoou003E","'bar'",""baz"","&blong&","123.4","u00e9","sl/ash"] +Apos: ["<foo>","u0027baru0027",""baz"","&blong&","123.4","u00e9","sl/ash"] +Quot: ["<foo>","'bar'","u0022bazu0022","&blong&","123.4","u00e9","sl/ash"] +Amp: ["<foo>","'bar'",""baz"","u0026blongu0026","123.4","u00e9","sl/ash"] +Numeric: ["<foo>","'bar'",""baz"","&blong&",123.4,"u00e9","sl/ash"] +Unicode: ["<foo>","'bar'",""baz"","&blong&","123.4","é","sl/ash"] +Slash: ["<foo>","'bar'",""baz"","&blong&","123.4","u00e9","sl/ash"] +All: ["u003Cfoou003E","u0027baru0027","u0022bazu0022","u0026blongu0026",123.4,"é","sl/ash"] Empty array output as array: [] Empty array output as object: {} @@ -171,6 +219,18 @@ Associative array always output as object: {"foo":"bar","baz":"long"} Associative array always output as object: {"foo":"bar","baz":"long"} + +Associative array pretty-printed: +{ + "array": [ + 1, + 2, + [ + 3 + ] + ], + "string": "4" +} ]]> </screen> </example> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42622 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42622 ------------------------------------------------------------------ Modified: en/reference/exif/functions/exif-imagetype.xml By: anonymous on 2012-10-31 11:01:18 =================================================================== --- en/reference/exif/functions/exif-imagetype.xml +++ en/reference/exif/functions/exif-imagetype.xml @@ -46,6 +46,16 @@ same value that <function>getimagesize</function> returns in index 2 but <function>exif_imagetype</function> is much faster. </para> + + <note> + <para> + <function>exif_imagetype</function> will emit an <constant>E_NOTICE</constant> + and return &false; if it is unable to read enough bytes from the file to + determine the image type. + <!-- If the function finds an incomplete PNG header then it may emit an + <constant>E_WARNING</constant> instead. - Is this worth including? --> + </para> + </note> </refsect1> <refsect1 role="changelog"> &reftitle.changelog; => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42623 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42623 ------------------------------------------------------------------ Modified: en/reference/pcntl/functions/pcntl-signal.xml By: anonymous on 2012-10-31 11:19:55 =================================================================== --- en/reference/pcntl/functions/pcntl-signal.xml +++ en/reference/pcntl/functions/pcntl-signal.xml @@ -153,9 +153,9 @@ pcntl_signal(SIGUSR1, "sig_handler"); // or use an object, available as of PHP 4.3.0 -// pcntl_signal(SIGUSR1, array($obj, "do_something"); +// pcntl_signal(SIGUSR1, array($obj, "do_something")); -echo"Generating signal SIGTERM to self...n"; +echo "Generating signal SIGTERM to self...n"; // send SIGUSR1 to current process id posix_kill(posix_getpid(), SIGUSR1); => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42624 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42624 ------------------------------------------------------------------ Modified: en/reference/funchand/functions/register-shutdown-function.xml By: anonymous on 2012-10-31 11:37:49 =================================================================== --- en/reference/funchand/functions/register-shutdown-function.xml +++ en/reference/funchand/functions/register-shutdown-function.xml @@ -142,6 +142,14 @@ under some web servers, e.g. Apache. </para> </note> + <note> + <para> + Shutdown functions will not be executed if the process is killed with a SIGTERM + or SIGKILL signal. While you cannot intercept a SIGKILL, you can use <function>pcntl_signal</function> + to install a handler for a SIGTERM which uses <function>exit</function> to + end cleanly. + </para> + </note> </refsect1> <refsect1 role="seealso"> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42625 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42625 ------------------------------------------------------------------ Modified: en/reference/array/functions/count.xml By: anonymous on 2012-11-02 16:29:19 =================================================================== --- en/reference/array/functions/count.xml +++ en/reference/array/functions/count.xml @@ -49,8 +49,15 @@ <constant>COUNT_RECURSIVE</constant> (or 1), <function>count</function> will recursively count the array. This is particularly useful for counting all the elements of a multidimensional array. - <function>count</function> does not detect infinite recursion. </para> + <caution> + <para> + <function>count</function> can detect recursion to avoid an infinite + loop, but will emit an <constant>E_WARNING</constant> every time it + does (in case the array contains itself more than once) and return a + count higher than you may expect. + </para> + </caution> </listitem> </varlistentry> </variablelist> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=42710 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=42710 ------------------------------------------------------------------ -- https://edit.php.net/ This email is send automatically by the Php Docbook Online Editor.

« previous php.doc (#969384133) next »