Contributions are ready for review

From: Date: Mon, 12 Nov 2012 13:00:04 +0000
Subject: Contributions are ready for review
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969384136@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/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/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/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/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/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 (#969384136) next »