[PHP-DOC] cvs: phpdoc /en/reference/misc/functions halt-compiler.xml
hsc Sat Nov 11 19:02:48 2006 UTC Modified files: /phpdoc/en/reference/misc/functions halt-compiler.xml Log: typos: instalation - installation, etc.. - etc. http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/halt-compiler.xml?r1=1.3r2=1.4diff_format=u Index: phpdoc/en/reference/misc/functions/halt-compiler.xml diff -u phpdoc/en/reference/misc/functions/halt-compiler.xml:1.3 phpdoc/en/reference/misc/functions/halt-compiler.xml:1.4 --- phpdoc/en/reference/misc/functions/halt-compiler.xml:1.3Wed Sep 21 21:25:24 2005 +++ phpdoc/en/reference/misc/functions/halt-compiler.xmlSat Nov 11 19:02:47 2006 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.3 $ -- +!-- $Revision: 1.4 $ -- refentry id=function.halt-compiler refnamediv refname__halt_compiler/refname @@ -48,7 +48,7 @@ var_dump(stream_get_contents($fp)); // the end of the script execution -__halt_compiler();the instalation data (eg. tar, gz, PHP, etc..) +__halt_compiler();the installation data (eg. tar, gz, PHP, etc.) ]] /programlisting /example
[PHP-DOC] cvs: phpdoc /en/reference/mysql/functions mysql-info.xml
hsc Tue Jul 4 10:29:34 2006 UTC Modified files: /phpdoc/en/reference/mysql/functionsmysql-info.xml Log: style; missing period added http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/mysql/functions/mysql-info.xml?r1=1.9r2=1.10diff_format=u Index: phpdoc/en/reference/mysql/functions/mysql-info.xml diff -u phpdoc/en/reference/mysql/functions/mysql-info.xml:1.9 phpdoc/en/reference/mysql/functions/mysql-info.xml:1.10 --- phpdoc/en/reference/mysql/functions/mysql-info.xml:1.9 Thu Mar 31 07:47:25 2005 +++ phpdoc/en/reference/mysql/functions/mysql-info.xml Tue Jul 4 10:29:34 2006 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.9 $ -- +!-- $Revision: 1.10 $ -- refentry id=function.mysql-info refnamediv refnamemysql_info/refname @@ -31,8 +31,8 @@ para Returns information about the statement on success, or false; on failure. See the example below for which statements provide information, - and what the returned value may look like. Statements that aren't listed - will return false; + and what the returned value may look like. Statements that are not listed + will return false;. /para /refsect1
[PHP-DOC] ext/mysql return types
Hi, I just noticed that the return types of some ext/mysql functions are not correct, or at least misleading. 1) mixed return values in normal usage In the description of mysql_query(), the interface is shown as follows: resource mysql_query ( string query [, resource link_identifier] ) But the Return Values section makes clear that the return type could also be a boolean; shouldn't the return type be mixed instead of resource, as for example in the documentation to mysqli_query() -- or has this been documented this way for a reason? All ext/mysql functions which return mixed types but are not properly documented to do so: * mysql_query * mysql_db_query * mysql_fetch_array * mysql_fetch_assoc * mysql_fetch_field (here the docs even lack or FALSE if there are no more rows in the Return Values section) * mysql_fetch_object * mysql_fetch_row * mysql_unbuffered_query 2) mixed return values on error paths --- Similarly this is true for mysql_connect(), although here FALSE is only returned on failure; the normal return type is resource. Is this intentional, or should it also be corrected to mixed? (I'd vote for the former.) All ext/mysql functions which return FALSE on failure but are not documented to do so in the Description: mysql_connect, mysql_db_name, mysql_fetch_lengths, mysql_field_flags, mysql_field_len, mysql_field_name, mysql_field_table, mysql_field_type, mysql_get_host_info, mysql_get_proto_info, mysql_get_server_info, mysql_info, mysql_insert_id, mysql_list_dbs, mysql_list_fields, mysql_list_processes, mysql_list_tables, mysql_num_fields, mysql_num_rows, mysql_pconnect, mysql_real_escape_string, mysql_result, mysql_stat (returns NULL on failure, not FALSE), mysql_tablename, mysql_thread_id. 3) minor corrections Beyond this, * mysql_field_seek needs a Return Values section (although it is intuitive that it returns TRUE on success and FALSE on failure). * mysql_field_table and mysql_field_type need returns FALSE on failure to be documented. Any comments/objections to these corrections? If nobody vetoes, I would starting to fix 1) and 3) the next days. Kind regards, Horst -- PGP-Key 0xD40E0E7A
Re: [PHP-DOC] ext/mysql return types
On Tue, 04 Jul 2006, Nuno Lopes wrote: The answer to your questions are answered in our howto. Mainly here: http://doc.php.net/php/dochowto/chapter-conventions.php Quoting the important part (for now): Do not use mixed, if the return value is of a certain (not boolean) type, and FALSE only on error. Provide the primary return type as the return type of the function, and write down in the explanation, that it returns FALSE on error. Use return.success; if the function returns TRUE on success, and FALSE on failure. Oh, okay. Seems I missed this part. So 2) 'mixed return values on error paths is clearly a no. But what about 1) 'mixed return values in normal usage', for example mysql_query(), which may return TRUE in normal usage? Or mysql_fetch_array() which returns FALSE if there are no more rows -- should this be considered an error condition? At least the mysql_query() issue confused someone on IRC today. (Besides this, I still consider my corrections 3) as valid.) Kind regards, Horst - Original Message - Hi, I just noticed that the return types of some ext/mysql functions are not correct, or at least misleading. 1) mixed return values in normal usage In the description of mysql_query(), the interface is shown as follows: resource mysql_query ( string query [, resource link_identifier] ) But the Return Values section makes clear that the return type could also be a boolean; shouldn't the return type be mixed instead of resource, as for example in the documentation to mysqli_query() -- or has this been documented this way for a reason? All ext/mysql functions which return mixed types but are not properly documented to do so: * mysql_query * mysql_db_query * mysql_fetch_array * mysql_fetch_assoc * mysql_fetch_field (here the docs even lack or FALSE if there are no more rows in the Return Values section) * mysql_fetch_object * mysql_fetch_row * mysql_unbuffered_query 2) mixed return values on error paths --- Similarly this is true for mysql_connect(), although here FALSE is only returned on failure; the normal return type is resource. Is this intentional, or should it also be corrected to mixed? (I'd vote for the former.) All ext/mysql functions which return FALSE on failure but are not documented to do so in the Description: mysql_connect, mysql_db_name, mysql_fetch_lengths, mysql_field_flags, mysql_field_len, mysql_field_name, mysql_field_table, mysql_field_type, mysql_get_host_info, mysql_get_proto_info, mysql_get_server_info, mysql_info, mysql_insert_id, mysql_list_dbs, mysql_list_fields, mysql_list_processes, mysql_list_tables, mysql_num_fields, mysql_num_rows, mysql_pconnect, mysql_real_escape_string, mysql_result, mysql_stat (returns NULL on failure, not FALSE), mysql_tablename, mysql_thread_id. 3) minor corrections Beyond this, * mysql_field_seek needs a Return Values section (although it is intuitive that it returns TRUE on success and FALSE on failure). * mysql_field_table and mysql_field_type need returns FALSE on failure to be documented. Any comments/objections to these corrections? If nobody vetoes, I would starting to fix 1) and 3) the next days. Kind regards, Horst -- PGP-Key 0xD40E0E7A
[PHP-DOC] cvs: phpdoc /en/language operators.xml
hsc Tue May 9 18:18:35 2006 UTC Modified files: /phpdoc/en/language operators.xml Log: minor correction: not the output of foo() but the return value is stored in $a http://cvs.php.net/viewcvs.cgi/phpdoc/en/language/operators.xml?r1=1.101r2=1.102diff_format=u Index: phpdoc/en/language/operators.xml diff -u phpdoc/en/language/operators.xml:1.101 phpdoc/en/language/operators.xml:1.102 --- phpdoc/en/language/operators.xml:1.101 Sat Feb 18 23:10:39 2006 +++ phpdoc/en/language/operators.xmlTue May 9 18:18:34 2006 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.101 $ -- +!-- $Revision: 1.102 $ -- chapter id=language.operators titleOperators/title simpara @@ -218,7 +218,7 @@ Although literal!/literal has a higher precedence than literal=/literal, PHP will still allow expressions similar to the following: literalif (!$a = foo())/literal, - in which case the output from literalfoo()/literal is + in which case the return value of literalfoo()/literal is put into varname$a/varname. /para /note
[PHP-DOC] cvs: phpdoc /en/reference/array/functions reset.xml
hsc Sun Nov 27 20:34:01 2005 EDT Modified files: /phpdoc/en/reference/array/functionsreset.xml Log: reference to array function end added http://cvs.php.net/diff.php/phpdoc/en/reference/array/functions/reset.xml?r1=1.13r2=1.14ty=u Index: phpdoc/en/reference/array/functions/reset.xml diff -u phpdoc/en/reference/array/functions/reset.xml:1.13 phpdoc/en/reference/array/functions/reset.xml:1.14 --- phpdoc/en/reference/array/functions/reset.xml:1.13 Wed Nov 10 03:30:21 2004 +++ phpdoc/en/reference/array/functions/reset.xml Sun Nov 27 20:33:59 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.13 $ -- +!-- $Revision: 1.14 $ -- !-- splitted from ./en/functions/array.xml, last change in rev 1.2 -- refentry id=function.reset refnamediv @@ -47,8 +47,8 @@ /para para See also functioncurrent/function, - functioneach/function, functionnext/function, - and functionprev/function. + functioneach/function, functionend/function, + functionnext/function, and functionprev/function. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/reference/pcre/functions preg-replace-callback.xml
hsc Thu Mar 3 08:42:15 2005 EDT Modified files: /phpdoc/en/reference/pcre/functions preg-replace-callback.xml Log: callback type see also added http://cvs.php.net/diff.php/phpdoc/en/reference/pcre/functions/preg-replace-callback.xml?r1=1.8r2=1.9ty=u Index: phpdoc/en/reference/pcre/functions/preg-replace-callback.xml diff -u phpdoc/en/reference/pcre/functions/preg-replace-callback.xml:1.8 phpdoc/en/reference/pcre/functions/preg-replace-callback.xml:1.9 --- phpdoc/en/reference/pcre/functions/preg-replace-callback.xml:1.8Thu Jan 15 07:43:10 2004 +++ phpdoc/en/reference/pcre/functions/preg-replace-callback.xmlThu Mar 3 08:42:12 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.8 $ -- +!-- $Revision: 1.9 $ -- !-- splitted from ./en/functions/pcre.xml, last change in rev 1.47 -- refentry id=function.preg-replace-callback refnamediv @@ -93,8 +93,9 @@ /programlisting /example para - See also functionpreg_replace/function and - functioncreate_function/function. + See also functionpreg_replace/function, + functioncreate_function/function, + listendand; seealso.callback;. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /en/reference/funchand/functions call-user-func.xml
hsc Thu Jan 20 07:44:59 2005 EDT Modified files: /phpdoc/en/reference/funchand/functions call-user-func.xml Log: listendand; entity added http://cvs.php.net/diff.php/phpdoc/en/reference/funchand/functions/call-user-func.xml?r1=1.12r2=1.13ty=u Index: phpdoc/en/reference/funchand/functions/call-user-func.xml diff -u phpdoc/en/reference/funchand/functions/call-user-func.xml:1.12 phpdoc/en/reference/funchand/functions/call-user-func.xml:1.13 --- phpdoc/en/reference/funchand/functions/call-user-func.xml:1.12 Sun Sep 12 05:49:55 2004 +++ phpdoc/en/reference/funchand/functions/call-user-func.xml Thu Jan 20 07:44:59 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.12 $ -- +!-- $Revision: 1.13 $ -- !-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -- refentry id=function.call-user-func refnamediv @@ -89,7 +89,7 @@ See also: functionis_callable/function, functioncall_user_func_array/function, - and seealso.callback; + listendand; seealso.callback;. /para /refsect1 /refentry
[PHP-DOC] cvs: phpdoc /xsl common.xsl htmlhelp.xsl
hsc Sat Jan 8 13:30:48 2005 EDT Modified files: /phpdoc/xsl common.xsl htmlhelp.xsl Log: comment correction: XSL already implements a space in front of ')' http://cvs.php.net/diff.php/phpdoc/xsl/common.xsl?r1=1.26r2=1.27ty=u Index: phpdoc/xsl/common.xsl diff -u phpdoc/xsl/common.xsl:1.26 phpdoc/xsl/common.xsl:1.27 --- phpdoc/xsl/common.xsl:1.26 Sun Nov 21 16:13:48 2004 +++ phpdoc/xsl/common.xsl Sat Jan 8 13:30:48 2005 @@ -3,7 +3,7 @@ common.xsl: Common customizations for all HTML formats - $Id: common.xsl,v 1.26 2004/11/21 21:13:48 techtonik Exp $ + $Id: common.xsl,v 1.27 2005/01/08 18:30:48 hsc Exp $ What is done in this stylesheet as common to all HTML output formats: @@ -80,7 +80,7 @@ !-- Rendering of METHODSYNOPSIS. The output of this should look like: - int preg_match_all ( string pattern, string subject, array matches [, int flags]) + int preg_match_all ( string pattern, string subject, array matches [, int flags] ) working from a structure like this: http://cvs.php.net/diff.php/phpdoc/xsl/htmlhelp.xsl?r1=1.18r2=1.19ty=u Index: phpdoc/xsl/htmlhelp.xsl diff -u phpdoc/xsl/htmlhelp.xsl:1.18 phpdoc/xsl/htmlhelp.xsl:1.19 --- phpdoc/xsl/htmlhelp.xsl:1.18Sun Nov 14 09:28:25 2004 +++ phpdoc/xsl/htmlhelp.xsl Sat Jan 8 13:30:48 2005 @@ -3,7 +3,7 @@ HTML Help specific stylesheet - $Id: htmlhelp.xsl,v 1.18 2004/11/14 14:28:25 techtonik Exp $ + $Id: htmlhelp.xsl,v 1.19 2005/01/08 18:30:48 hsc Exp $ -- xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; @@ -625,7 +625,7 @@ !-- Rendering of METHODSYNOPSIS with span tags. The output of this should look like: - int preg_match_all ( string pattern, string subject, array matches [, int flags]) + int preg_match_all ( string pattern, string subject, array matches [, int flags] ) working from a structure like this:
[PHP-DOC] cvs: phpdoc /en/install/unix gentoo.xml
hsc Fri Jan 7 20:20:07 2005 EDT Modified files: /phpdoc/en/install/unix gentoo.xml Log: typo http://cvs.php.net/diff.php/phpdoc/en/install/unix/gentoo.xml?r1=1.3r2=1.4ty=u Index: phpdoc/en/install/unix/gentoo.xml diff -u phpdoc/en/install/unix/gentoo.xml:1.3 phpdoc/en/install/unix/gentoo.xml:1.4 --- phpdoc/en/install/unix/gentoo.xml:1.3 Thu Aug 12 21:00:42 2004 +++ phpdoc/en/install/unix/gentoo.xml Fri Jan 7 20:20:07 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.3 $ -- +!-- $Revision: 1.4 $ -- sect1 id=install.unix.gentoo titleGentoo installation notes/title para @@ -22,7 +22,7 @@ simpara The first decision you need to make is whether you want to install Apache 1.3.x or Apache 2.x. While both can be used with PHP, the -steps given bellow will use Apache 1.3.x. Another thing to consider +steps given below will use Apache 1.3.x. Another thing to consider is whether your local Portage tree is up to date. If you have not updated it recently, you need to run commandemerge sync/command before anything else. This way, you will be using the most recent
[PHP-DOC] method synopsis formatting
Hi, the following only deals with a minor formatting issue, which nevertheless disturbs me for quite a while. I suggest changing the method synopsis formatting in the docs from (example; note the whitespace around the first parenthesis): mixed array_search ( mixed needle, array haystack [, bool strict]) to some PEAR coding standards conform: (1) mixed array_search(mixed needle, array haystack [, bool strict]) or a maybe better readable: (2) mixed array_search (mixed needle, array haystack [, bool strict]) I'd still prefer the first proposal. Opinions? Please comment, I won't commit this without some backing as it will change the overall look of php.net/manual. Below my current cvs diff which (hopefully) implements (1); did I miss something? Regards, Horst Schirmeier -- PGP-Key 0xD40E0E7A Index: dsssl/common.dsl.in === RCS file: /repository/phpdoc/dsssl/common.dsl.in,v retrieving revision 1.11 diff -u -r1.11 common.dsl.in --- dsssl/common.dsl.in 31 Aug 2004 22:21:49 - 1.11 +++ dsssl/common.dsl.in 8 Jan 2005 01:51:01 - @@ -206,7 +206,7 @@ ($bold-seq$ (process-children-trim) ) - (literal ( ) ;; start parameter list + (literal () ;; start parameter list ) ) @@ -215,7 +215,7 @@ ($bold-seq$ (process-children-trim) ) - (literal ( ) ;; start parameter list + (literal () ;; start parameter list ) ) Index: xsl/common.xsl === RCS file: /repository/phpdoc/xsl/common.xsl,v retrieving revision 1.26 diff -u -r1.26 common.xsl --- xsl/common.xsl 21 Nov 2004 21:13:48 - 1.26 +++ xsl/common.xsl 8 Jan 2005 01:51:04 - @@ -80,7 +80,7 @@ !-- Rendering of METHODSYNOPSIS. The output of this should look like: - int preg_match_all ( string pattern, string subject, array matches [, int flags]) + int preg_match_all(string pattern, string subject, array matches [, int flags]) working from a structure like this: @@ -110,7 +110,7 @@ /xsl:template xsl:template match=methodsynopsis/void - xsl:text ( void )/xsl:text + xsl:text(void)/xsl:text /xsl:template xsl:template match=methodsynopsis/methodname @@ -133,7 +133,7 @@ xsl:template match=methodparam xsl:if test=preceding-sibling::methodparam=false() -xsl:text ( /xsl:text +xsl:text(/xsl:text xsl:if test=@choice='opt' xsl:text[/xsl:text /xsl:if @@ -159,7 +159,7 @@ xsl:if test=self::methodparam/@choice='opt' xsl:text]/xsl:text /xsl:if - xsl:text )/xsl:text + xsl:text)/xsl:text /xsl:otherwise /xsl:choose /xsl:template Index: xsl/htmlhelp.xsl === RCS file: /repository/phpdoc/xsl/htmlhelp.xsl,v retrieving revision 1.18 diff -u -r1.18 htmlhelp.xsl --- xsl/htmlhelp.xsl14 Nov 2004 14:28:25 - 1.18 +++ xsl/htmlhelp.xsl8 Jan 2005 01:51:04 - @@ -625,7 +625,7 @@ !-- Rendering of METHODSYNOPSIS with span tags. The output of this should look like: - int preg_match_all ( string pattern, string subject, array matches [, int flags]) + int preg_match_all(string pattern, string subject, array matches [, int flags]) working from a structure like this: @@ -649,12 +649,12 @@ span class=funcname xsl:value-of select=./methodname/text()/ /span -xsl:text ( /xsl:text +xsl:text(/xsl:text xsl:apply-templates select=./methodparam mode=php/ xsl:for-each select=./[EMAIL PROTECTED] = 'opt'] xsl:text]/xsl:text /xsl:for-each -xsl:text )/xsl:text +xsl:text)/xsl:text /div /xsl:template
[PHP-DOC] cvs: phpdoc /howto cvs.xml
hsc Wed Dec 15 21:18:28 2004 EDT Modified files: /phpdoc/howto cvs.xml Log: spelling corrections http://cvs.php.net/diff.php/phpdoc/howto/cvs.xml?r1=1.14r2=1.15ty=u Index: phpdoc/howto/cvs.xml diff -u phpdoc/howto/cvs.xml:1.14 phpdoc/howto/cvs.xml:1.15 --- phpdoc/howto/cvs.xml:1.14 Tue Feb 10 06:34:58 2004 +++ phpdoc/howto/cvs.xmlWed Dec 15 21:18:26 2004 @@ -514,7 +514,7 @@ /para para -This only shedules the file for addition. To +This only schedules the file for addition. To complete the addition of the file(s), you need to do a commit, as described above. /para @@ -553,7 +553,7 @@ /para para -This only shedules the file for removing. To +This only schedules the file for removing. To complete the removing of the file(s), you need to do a commit, as described above. /para
[PHP-DOC] cvs: phpdoc /entities global.ent
hsc Wed Dec 15 21:45:37 2004 EDT Modified files: /phpdoc/entitiesglobal.ent Log: gentoo portage link corrected (make test_xml failed on ampersand) http://cvs.php.net/diff.php/phpdoc/entities/global.ent?r1=1.205r2=1.206ty=u Index: phpdoc/entities/global.ent diff -u phpdoc/entities/global.ent:1.205 phpdoc/entities/global.ent:1.206 --- phpdoc/entities/global.ent:1.205Sun Dec 12 07:20:34 2004 +++ phpdoc/entities/global.ent Wed Dec 15 21:45:37 2004 @@ -1,6 +1,6 @@ !-- -*- SGML -*- - $Id: global.ent,v 1.205 2004/12/12 12:20:34 nlopess Exp $ + $Id: global.ent,v 1.206 2004/12/16 02:45:37 hsc Exp $ Contains global macros for all the XML documents. @@ -96,7 +96,7 @@ !ENTITY url.gdbm ftp://ftp.gnu.org/pub/gnu/gdbm/; !ENTITY url.gentoo http://www.gentoo.org/; !ENTITY url.gentoo.forums http://forums.gentoo.org/; -!ENTITY url.gentoo.portage http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2chap=1; +!ENTITY url.gentoo.portage http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2amp;chap=1; !ENTITY url.gettext http://www.gnu.org/software/gettext/gettext.html; !ENTITY url.gettext.docs http://www.gnu.org/software/gettext/manual/gettext.html; !ENTITY url.gmp http://www.swox.com/gmp/;