cvs: phpdoc /en/reference/misc/functions connection-aborted.xml connection-status.xml connection-timeout.xml constant.xml define.xml defined.xml
die.xml eval.xml exit.xml get-browser.xml highlight-file.xml highlight-string.xml ignore-user-abort.xml pack.xml php-strip-whitespace.xml sleep.xml
time-nanosleep.xml uniqid.xml unpack.xml usleep.xml

From: Date: Mon, 19 Feb 2007 00:02:49 +0000
Subject: cvs: phpdoc /en/reference/misc/functions connection-aborted.xml connection-status.xml connection-timeout.xml constant.xml define.xml defined.xml
die.xml eval.xml exit.xml get-browser.xml highlight-file.xml highlight-string.xml ignore-user-abort.xml pack.xml php-strip-whitespace.xml sleep.xml
time-nanosleep.xml uniqid.xml unpack.xml usleep.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969375515@lists.php.net to get a copy of this message
didou Mon Feb 19 00:02:49 2007 UTC Modified files: /phpdoc/en/reference/misc/functions connection-aborted.xml connection-status.xml connection-timeout.xml constant.xml define.xml defined.xml die.xml eval.xml exit.xml get-browser.xml highlight-file.xml highlight-string.xml ignore-user-abort.xml pack.xml php-strip-whitespace.xml sleep.xml time-nanosleep.xml uniqid.xml unpack.xml usleep.xml Log: WS, prepare for new doc style

http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/connection-aborted.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/misc/functions/connection-aborted.xml diff -u phpdoc/en/reference/misc/functions/connection-aborted.xml:1.4 phpdoc/en/reference/misc/functions/connection-aborted.xml:1.5 --- phpdoc/en/reference/misc/functions/connection-aborted.xml:1.4 Mon Jul 14 22:59:56 2003 +++ phpdoc/en/reference/misc/functions/connection-aborted.xml Mon Feb 19 00:02:49 2007 @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.connection-aborted"> - <refnamediv> - <refname>connection_aborted</refname> - <refpurpose>Returns &true; if client disconnected</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>connection_aborted</methodname> - <void/> - </methodsynopsis> - <simpara> - Returns &true; if client disconnected. See the <link - linkend="features.connection-handling">Connection Handling</link> - description in the <link linkend="features">Features</link> - chapter for a complete explanation. - </simpara> - <para> - See also <function>connection_status</function>, and - <function>ignore_user_abort</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.connection-aborted"> + <refnamediv> + <refname>connection_aborted</refname> + <refpurpose>Returns &true; if client disconnected</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>connection_aborted</methodname> + <void/> + </methodsynopsis> + <simpara> + Returns &true; if client disconnected. See the <link + linkend="features.connection-handling">Connection Handling</link> + description in the <link linkend="features">Features</link> + chapter for a complete explanation. + </simpara> + <para> + See also <function>connection_status</function>, and + <function>ignore_user_abort</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/connection-status.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/misc/functions/connection-status.xml diff -u phpdoc/en/reference/misc/functions/connection-status.xml:1.4 phpdoc/en/reference/misc/functions/connection-status.xml:1.5 --- phpdoc/en/reference/misc/functions/connection-status.xml:1.4 Mon Jul 14 22:59:56 2003 +++ phpdoc/en/reference/misc/functions/connection-status.xml Mon Feb 19 00:02:49 2007 @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.connection-status"> - <refnamediv> - <refname>connection_status</refname> - <refpurpose>Returns connection status bitfield</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>connection_status</methodname> - <void/> - </methodsynopsis> - <simpara> - Returns the connection status bitfield. See the <link - linkend="features.connection-handling">Connection Handling</link> - description in the <link linkend="features">Features</link> - chapter for a complete explanation. - </simpara> - <para> - See also <function>connection_aborted</function>, and - <function>ignore_user_abort</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.connection-status"> + <refnamediv> + <refname>connection_status</refname> + <refpurpose>Returns connection status bitfield</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>connection_status</methodname> + <void/> + </methodsynopsis> + <simpara> + Returns the connection status bitfield. See the <link + linkend="features.connection-handling">Connection Handling</link> + description in the <link linkend="features">Features</link> + chapter for a complete explanation. + </simpara> + <para> + See also <function>connection_aborted</function>, and + <function>ignore_user_abort</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/connection-timeout.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/misc/functions/connection-timeout.xml diff -u phpdoc/en/reference/misc/functions/connection-timeout.xml:1.3 phpdoc/en/reference/misc/functions/connection-timeout.xml:1.4 --- phpdoc/en/reference/misc/functions/connection-timeout.xml:1.3 Tue Jul 27 21:19:36 2004 +++ phpdoc/en/reference/misc/functions/connection-timeout.xml Mon Feb 19 00:02:49 2007 @@ -1,42 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.connection-timeout"> - <refnamediv> - <refname>connection_timeout</refname> - <refpurpose>Return &true; if script timed out</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>connection_timeout</methodname> - <void/> - </methodsynopsis> - <simpara> - Returns &true; if script timed out. - </simpara> - <warning> - <title>Deprecated</title> - <simpara> - This function is deprecated, and doesn't even exist anymore - as of 4.0.5. - </simpara> - <!-- so it's quite late to declare it 'deprecated' by now :) - TODO: correct connection handling. Any volunteers? - --> - </warning> - - <simpara> - See the <link - linkend="features.connection-handling">Connection Handling</link> - description in the <link linkend="features">Features</link> - chapter for a complete explanation. - </simpara> - <para> - See also <function>connection_status</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.connection-timeout"> + <refnamediv> + <refname>connection_timeout</refname> + <refpurpose>Return &true; if script timed out</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>connection_timeout</methodname> + <void/> + </methodsynopsis> + <simpara> + Returns &true; if script timed out. + </simpara> + <warning> + <title>Deprecated</title> + <simpara> + This function is deprecated, and doesn't even exist anymore + as of 4.0.5. + </simpara> + <!-- so it's quite late to declare it 'deprecated' by now :) + TODO: correct connection handling. Any volunteers? + --> + </warning> + + <simpara> + See the <link + linkend="features.connection-handling">Connection Handling</link> + description in the <link linkend="features">Features</link> + chapter for a complete explanation. + </simpara> + <para> + See also <function>connection_status</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/constant.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/misc/functions/constant.xml diff -u phpdoc/en/reference/misc/functions/constant.xml:1.5 phpdoc/en/reference/misc/functions/constant.xml:1.6 --- phpdoc/en/reference/misc/functions/constant.xml:1.5 Tue Sep 20 13:25:02 2005 +++ phpdoc/en/reference/misc/functions/constant.xml Mon Feb 19 00:02:49 2007 @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.38 --> - <refentry id="function.constant"> - <refnamediv> - <refname>constant</refname> - <refpurpose>Returns the value of a constant</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>constant</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>constant</function> will return the value of the - constant indicated by <parameter>name</parameter>. - </simpara> - <simpara> - <function>constant</function> is useful if you need to retrieve - the value of a constant, but do not know its name. I.e. it is - stored in a variable or returned by a function. - </simpara> - <simpara> - This function works also with <link - linkend="language.oop5.constants">class constants</link>. - </simpara> - <para> - <example> - <title><function>constant</function> example</title> - <programlisting role="php"> +<refentry id="function.constant"> + <refnamediv> + <refname>constant</refname> + <refpurpose>Returns the value of a constant</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>constant</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <simpara> + <function>constant</function> will return the value of the + constant indicated by <parameter>name</parameter>. + </simpara> + <simpara> + <function>constant</function> is useful if you need to retrieve + the value of a constant, but do not know its name. I.e. it is + stored in a variable or returned by a function. + </simpara> + <simpara> + This function works also with <link + linkend="language.oop5.constants">class constants</link>. + </simpara> + <para> + <example> + <title><function>constant</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -39,16 +39,16 @@ ?> ]]> - </programlisting> - </example> - </para> - <para> - See also <function>define</function>, - <function>defined</function> and the section on <link - linkend="language.constants">Constants</link>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + See also <function>define</function>, + <function>defined</function> and the section on <link + linkend="language.constants">Constants</link>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/define.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/misc/functions/define.xml diff -u phpdoc/en/reference/misc/functions/define.xml:1.6 phpdoc/en/reference/misc/functions/define.xml:1.7 --- phpdoc/en/reference/misc/functions/define.xml:1.6 Thu Jun 15 11:11:31 2006 +++ phpdoc/en/reference/misc/functions/define.xml Mon Feb 19 00:02:49 2007 @@ -1,40 +1,40 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.define"> - <refnamediv> - <refname>define</refname> - <refpurpose>Defines a named constant</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>define</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - <methodparam><type>mixed</type><parameter>value</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>case_insensitive</parameter></methodparam> - </methodsynopsis> - <para> - Defines a named constant at runtime. See the - <link linkend="language.constants">section on constants</link> - for more details. - </para> - <para> - The name of the constant is given by <parameter>name</parameter>; - the value is given by <parameter>value</parameter>. - </para> - <para> - The optional third parameter - <parameter>case_insensitive</parameter> is also available. If the - value &true; is given, then the constant will be - defined case-insensitive. The default behaviour is - case-sensitive; i.e. CONSTANT and Constant represent different - values. - </para> - <para> - <example> - <title>Defining Constants</title> - <programlisting role="php"> +<refentry id="function.define"> + <refnamediv> + <refname>define</refname> + <refpurpose>Defines a named constant</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>define</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>case_insensitive</parameter></methodparam> + </methodsynopsis> + <para> + Defines a named constant at runtime. See the + <link linkend="language.constants">section on constants</link> + for more details. + </para> + <para> + The name of the constant is given by <parameter>name</parameter>; + the value is given by <parameter>value</parameter>. + </para> + <para> + The optional third parameter + <parameter>case_insensitive</parameter> is also available. If the + value &true; is given, then the constant will be + defined case-insensitive. The default behaviour is + case-sensitive; i.e. CONSTANT and Constant represent different + values. + </para> + <para> + <example> + <title>Defining Constants</title> + <programlisting role="php"> <![CDATA[ <?php define("CONSTANT", "Hello world."); @@ -47,19 +47,19 @@ ?> ]]> - </programlisting> - </example> - </para> - <para> - &return.success; - </para> - <para> - See also <function>defined</function>, - <function>constant</function> and the section on <link - linkend="language.constants">Constants</link>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + &return.success; + </para> + <para> + See also <function>defined</function>, + <function>constant</function> and the section on <link + linkend="language.constants">Constants</link>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/defined.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/misc/functions/defined.xml diff -u phpdoc/en/reference/misc/functions/defined.xml:1.8 phpdoc/en/reference/misc/functions/defined.xml:1.9 --- phpdoc/en/reference/misc/functions/defined.xml:1.8 Wed Jul 2 13:34:09 2003 +++ phpdoc/en/reference/misc/functions/defined.xml Mon Feb 19 00:02:49 2007 @@ -1,58 +1,56 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.defined"> - <refnamediv> - <refname>defined</refname> - <refpurpose> - Checks whether a given named constant exists - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>defined</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - Returns &true; if the named constant given by - <parameter>name</parameter> has been defined, - &false; otherwise. - </para> - <para> - <example> - <title>Checking Constants</title> - <programlisting role="php"> +<refentry id="function.defined"> + <refnamediv> + <refname>defined</refname> + <refpurpose>Checks whether a given named constant exists</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>defined</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <para> + Returns &true; if the named constant given by + <parameter>name</parameter> has been defined, + &false; otherwise. + </para> + <para> + <example> + <title>Checking Constants</title> + <programlisting role="php"> <![CDATA[ <?php -/* Note the use of quotes, this is important. This example is checking +/* Note the use of quotes, this is important. This example is checking * if the string 'CONSTANT' is the name of a constant named CONSTANT */ if (defined('CONSTANT')) { echo CONSTANT; } ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - If you want to see if a variable exists, use - <function>isset</function> as <function>defined</function> only - applies to <link linkend="language.constants">constants</link>. - If you want to see if a function exists, use - <function>function_exists</function>. - </para> - </note> - <para> - See also <function>define</function>, - <function>constant</function>, - <function>get_defined_constants</function>, - <function>function_exists</function>, and the section on - <link linkend="language.constants">Constants</link>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <para> + If you want to see if a variable exists, use + <function>isset</function> as <function>defined</function> only + applies to <link linkend="language.constants">constants</link>. + If you want to see if a function exists, use + <function>function_exists</function>. + </para> + </note> + <para> + See also <function>define</function>, + <function>constant</function>, + <function>get_defined_constants</function>, + <function>function_exists</function>, and the section on + <link linkend="language.constants">Constants</link>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/die.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/misc/functions/die.xml diff -u phpdoc/en/reference/misc/functions/die.xml:1.3 phpdoc/en/reference/misc/functions/die.xml:1.4 --- phpdoc/en/reference/misc/functions/die.xml:1.3 Sun Jan 25 16:04:05 2004 +++ phpdoc/en/reference/misc/functions/die.xml Mon Feb 19 00:02:49 2007 @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.57 --> - <refentry id="function.die"> - <refnamediv> - <refname>die</refname> - <refpurpose>Equivalent to <function>exit</function></refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <para> - This language construct is equivalent to <function>exit</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.die"> + <refnamediv> + <refname>die</refname> + <refpurpose>Equivalent to <function>exit</function></refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + This language construct is equivalent to <function>exit</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/eval.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc/en/reference/misc/functions/eval.xml diff -u phpdoc/en/reference/misc/functions/eval.xml:1.16 phpdoc/en/reference/misc/functions/eval.xml:1.17 --- phpdoc/en/reference/misc/functions/eval.xml:1.16 Wed May 24 15:50:37 2006 +++ phpdoc/en/reference/misc/functions/eval.xml Mon Feb 19 00:02:49 2007 @@ -1,55 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.58 --> - <refentry id="function.eval"> - <refnamediv> - <refname>eval</refname> - <refpurpose>Evaluate a string as PHP code</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>eval</methodname> - <methodparam><type>string</type><parameter>code_str</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>eval</function> evaluates the string given in - <parameter>code_str</parameter> as PHP code. Among other things, - this can be useful for storing code in a database text field for - later execution. <parameter>code_str</parameter> does not have to - contain <link linkend="language.basic-syntax.phpmode">PHP Opening - tags</link>. - </simpara> - <simpara> - There are some factors to keep in mind when using - <function>eval</function>. Remember that the string passed must - be valid PHP code, including things like terminating statements - with a semicolon so the parser doesn't die on the line after the - <function>eval</function>, and properly escaping things in - <parameter>code_str</parameter>. To mix HTML output and PHP code - you can use a closing PHP tag to leave PHP mode. - </simpara> - <simpara> - Also remember that variables given values under - <function>eval</function> will retain these values in the main - script afterwards. - </simpara> - <simpara> - A <literal>return</literal> statement will terminate the evaluation of - the string immediately. As of PHP 4, <function>eval</function> returns - &null; unless <literal>return</literal> is called in the evaluated - code, in which case the value passed to <literal>return</literal> is - returned. In case of a parse error in the evaluated code, - <function>eval</function> returns &false;. - In case of a fatal error in the evaluated code, the whole script exits. - In PHP 3, <function>eval</function> does not return a value. - </simpara> - <para> - <example> - <title> - <function>eval</function> example - simple text merge - </title> - <programlisting role="php"> +<refentry id="function.eval"> + <refnamediv> + <refname>eval</refname> + <refpurpose>Evaluate a string as PHP code</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>eval</methodname> + <methodparam><type>string</type><parameter>code_str</parameter></methodparam> + </methodsynopsis> + <simpara> + <function>eval</function> evaluates the string given in + <parameter>code_str</parameter> as PHP code. Among other things, + this can be useful for storing code in a database text field for + later execution. <parameter>code_str</parameter> does not have to + contain <link linkend="language.basic-syntax.phpmode">PHP Opening + tags</link>. + </simpara> + <simpara> + There are some factors to keep in mind when using + <function>eval</function>. Remember that the string passed must + be valid PHP code, including things like terminating statements + with a semicolon so the parser doesn't die on the line after the + <function>eval</function>, and properly escaping things in + <parameter>code_str</parameter>. To mix HTML output and PHP code + you can use a closing PHP tag to leave PHP mode. + </simpara> + <simpara> + Also remember that variables given values under + <function>eval</function> will retain these values in the main + script afterwards. + </simpara> + <simpara> + A <literal>return</literal> statement will terminate the evaluation of + the string immediately. As of PHP 4, <function>eval</function> returns + &null; unless <literal>return</literal> is called in the evaluated + code, in which case the value passed to <literal>return</literal> is + returned. In case of a parse error in the evaluated code, + <function>eval</function> returns &false;. + In case of a fatal error in the evaluated code, the whole script exits. + In PHP 3, <function>eval</function> does not return a value. + </simpara> + <para> + <example> + <title> + <function>eval</function> example - simple text merge + </title> + <programlisting role="php"> <![CDATA[ <?php $string = 'cup'; @@ -60,22 +60,22 @@ echo $str. "\n"; ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ This is a $string with my $name in it. This is a cup with my coffee in it. ]]> - </screen> - </example> - </para> - &tip.ob-capture; - <para> - See also <function>call_user_func</function>. - </para> - </refsect1> - </refentry> + </screen> + </example> + </para> + &tip.ob-capture; + <para> + See also <function>call_user_func</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/exit.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/misc/functions/exit.xml diff -u phpdoc/en/reference/misc/functions/exit.xml:1.11 phpdoc/en/reference/misc/functions/exit.xml:1.12 --- phpdoc/en/reference/misc/functions/exit.xml:1.11 Fri Jun 16 18:41:44 2006 +++ phpdoc/en/reference/misc/functions/exit.xml Mon Feb 19 00:02:49 2007 @@ -1,46 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.exit"> - <refnamediv> - <refname>exit</refname> - <refpurpose>Output a message and terminate the current script</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>exit</methodname> - <methodparam choice="opt"><type>string</type><parameter>status</parameter></methodparam> - </methodsynopsis> - <methodsynopsis> - <type>void</type><methodname>exit</methodname> - <methodparam><type>int</type><parameter>status</parameter></methodparam> - </methodsynopsis> - <note> - <simpara> - This is not a real function, but a language construct. - </simpara> - </note> - <note> - <simpara> - PHP &gt;= 4.2.0 does NOT print the <parameter>status</parameter> - if it is an <type>integer</type>. - </simpara> - </note> - <simpara> - The <function>exit</function> function terminates execution of - the script. It prints <parameter>status</parameter> just before exiting. - </simpara> - <simpara> - If <parameter>status</parameter> is an <type>integer</type>, that value - will also be used as the exit status. Exit statuses should be in the - range 0 to 254, the exit status 255 is reserved by PHP and shall not be - used. The status 0 is used to terminate the program successfully. - </simpara> - <para> - <example> - <title><function>exit</function> example</title> - <programlisting role="php"> +<refentry id="function.exit"> + <refnamediv> + <refname>exit</refname> + <refpurpose>Output a message and terminate the current script</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>exit</methodname> + <methodparam choice="opt"><type>string</type><parameter>status</parameter></methodparam> + </methodsynopsis> + <methodsynopsis> + <type>void</type><methodname>exit</methodname> + <methodparam><type>int</type><parameter>status</parameter></methodparam> + </methodsynopsis> + <note> + <simpara> + This is not a real function, but a language construct. + </simpara> + </note> + <note> + <simpara> + PHP &gt;= 4.2.0 does NOT print the <parameter>status</parameter> + if it is an <type>integer</type>. + </simpara> + </note> + <simpara> + The <function>exit</function> function terminates execution of + the script. It prints <parameter>status</parameter> just before exiting. + </simpara> + <simpara> + If <parameter>status</parameter> is an <type>integer</type>, that value + will also be used as the exit status. Exit statuses should be in the + range 0 to 254, the exit status 255 is reserved by PHP and shall not be + used. The status 0 is used to terminate the program successfully. + </simpara> + <para> + <example> + <title><function>exit</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -50,13 +50,13 @@ ?> ]]> - </programlisting> - </example> - </para> - <para> - <example> - <title><function>exit</function> status example</title> - <programlisting role="php"> + </programlisting> + </example> + </para> + <para> + <example> + <title><function>exit</function> status example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -71,19 +71,19 @@ ?> ]]> - </programlisting> - </example> - </para> - <note> - <simpara> - This language construct is equivalent to <function>die</function>. - </simpara> - </note> - <para> - See also: <function>register_shutdown_function</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <simpara> + This language construct is equivalent to <function>die</function>. + </simpara> + </note> + <para> + See also: <function>register_shutdown_function</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/get-browser.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/misc/functions/get-browser.xml diff -u phpdoc/en/reference/misc/functions/get-browser.xml:1.14 phpdoc/en/reference/misc/functions/get-browser.xml:1.15 --- phpdoc/en/reference/misc/functions/get-browser.xml:1.14 Fri Sep 30 08:30:43 2005 +++ phpdoc/en/reference/misc/functions/get-browser.xml Mon Feb 19 00:02:49 2007 @@ -1,49 +1,47 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.get-browser"> - <refnamediv> - <refname>get_browser</refname> - <refpurpose> - Tells what the user's browser is capable of - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>get_browser</methodname> - <methodparam choice="opt"><type>string</type><parameter>user_agent</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>return_array</parameter></methodparam> - </methodsynopsis> - <para> - <function>get_browser</function> attempts to determine the - capabilities of the user's browser. This is done by looking up - the browser's information in the <filename>browscap.ini</filename> - file. - </para> - <para> - By default, the value of HTTP User-Agent header is - used; however, you can alter this (i.e., look up another browser's - info) by passing the optional <parameter>user_agent</parameter> parameter to - <function>get_browser</function>. You can bypass <parameter>user_agent</parameter> - parameter with &null; value. - </para> - <simpara> - The information is returned in an <type>object</type>, which will contain - various data elements representing, for instance, the browser's - major and minor version numbers and ID string; &true;/&false; values - for features such as frames, JavaScript, and cookies; and so - forth. - </simpara> - <simpara> - As of PHP 4.3.2, if the optional parameter - <parameter>return_array</parameter> is &true;, this function will return an - <type>array</type> instead of an <type>object</type>. - </simpara> - <para> - <example> - <title>Listing all information about the users browser</title> - <programlisting role="php"> +<refentry id="function.get-browser"> + <refnamediv> + <refname>get_browser</refname> + <refpurpose>Tells what the user's browser is capable of</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>get_browser</methodname> + <methodparam choice="opt"><type>string</type><parameter>user_agent</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>return_array</parameter></methodparam> + </methodsynopsis> + <para> + <function>get_browser</function> attempts to determine the + capabilities of the user's browser. This is done by looking up + the browser's information in the <filename>browscap.ini</filename> + file. + </para> + <para> + By default, the value of HTTP User-Agent header is + used; however, you can alter this (i.e., look up another browser's + info) by passing the optional <parameter>user_agent</parameter> parameter to + <function>get_browser</function>. You can bypass <parameter>user_agent</parameter> + parameter with &null; value. + </para> + <simpara> + The information is returned in an <type>object</type>, which will contain + various data elements representing, for instance, the browser's + major and minor version numbers and ID string; &true;/&false; values + for features such as frames, JavaScript, and cookies; and so + forth. + </simpara> + <simpara> + As of PHP 4.3.2, if the optional parameter + <parameter>return_array</parameter> is &true;, this function will return an + <type>array</type> instead of an <type>object</type>. + </simpara> + <para> + <example> + <title>Listing all information about the users browser</title> + <programlisting role="php"> <![CDATA[ <?php echo $_SERVER['HTTP_USER_AGENT'] . "\n\n"; @@ -52,9 +50,9 @@ print_r($browser); ?> ]]> - </programlisting> - &example.outputs.similar; - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 @@ -73,50 +71,50 @@ [iframes] => 1 [tables] => 1 [cookies] => 1 - [backgroundsounds] => - [vbscript] => + [backgroundsounds] => + [vbscript] => [javascript] => 1 [javaapplets] => 1 - [activexcontrols] => - [cdf] => - [aol] => + [activexcontrols] => + [cdf] => + [aol] => [beta] => 1 - [win16] => - [crawler] => - [stripper] => - [wap] => - [netclr] => + [win16] => + [crawler] => + [stripper] => + [wap] => + [netclr] => ) ]]> - </screen> - </example> - </para> - <para> - The <literal>cookies</literal> value simply means that the browser - itself is capable of accepting cookies and does not mean the user has - enabled the browser to accept cookies or not. The only way to test if - cookies are accepted is to set one with <function>setcookie</function>, - reload, and check for the value. - </para> - <note> - <para> - In order for this to work, your <link linkend="ini.browscap">browscap</link> - configuration setting in &php.ini; must point to the correct location of the - <filename>browscap.ini</filename> file on your system. - </para> - <para> - <filename>browscap.ini</filename> is not bundled with PHP, but you - may find an <ulink url="&url.browscap.download;">up-to-date php_browscap.ini</ulink> - file here. - </para> - <para> - While <filename>browscap.ini</filename> contains information on - many browsers, it relies on user updates to keep the database - current. The format of the file is fairly self-explanatory. - </para> - </note> - </refsect1> - </refentry> + </screen> + </example> + </para> + <para> + The <literal>cookies</literal> value simply means that the browser + itself is capable of accepting cookies and does not mean the user has + enabled the browser to accept cookies or not. The only way to test if + cookies are accepted is to set one with <function>setcookie</function>, + reload, and check for the value. + </para> + <note> + <para> + In order for this to work, your <link linkend="ini.browscap">browscap</link> + configuration setting in &php.ini; must point to the correct location of the + <filename>browscap.ini</filename> file on your system. + </para> + <para> + <filename>browscap.ini</filename> is not bundled with PHP, but you + may find an <ulink url="&url.browscap.download;">up-to-date php_browscap.ini</ulink> + file here. + </para> + <para> + While <filename>browscap.ini</filename> contains information on + many browsers, it relies on user updates to keep the database + current. The format of the file is fairly self-explanatory. + </para> + </note> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/highlight-file.xml?r1=1.21&r2=1.22&diff_format=u Index: phpdoc/en/reference/misc/functions/highlight-file.xml diff -u phpdoc/en/reference/misc/functions/highlight-file.xml:1.21 phpdoc/en/reference/misc/functions/highlight-file.xml:1.22 --- phpdoc/en/reference/misc/functions/highlight-file.xml:1.21 Tue Mar 7 01:12:15 2006 +++ phpdoc/en/reference/misc/functions/highlight-file.xml Mon Feb 19 00:02:49 2007 @@ -1,70 +1,70 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> +<!-- $Revision: 1.22 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 --> - <refentry id="function.highlight-file"> - <refnamediv> - <refname>highlight_file</refname> - <refpurpose>Syntax highlighting of a file</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>highlight_file</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam> - </methodsynopsis> - <simpara> - The <function>highlight_file</function> function prints out a syntax - highlighted version of the code contained in <parameter>filename</parameter> - using the colors defined in the built-in syntax highlighter for PHP. - </simpara> - <simpara> - If the second parameter <parameter>return</parameter> is set to &true; - then <function>highlight_file</function> will return the highlighted - code as a string instead of printing it out. If the second parameter is - not set to &true; then <function>highlight_file</function> will - return &true; on success, &false; on failure. - </simpara> - &note.uses-ob; - <note> - <simpara> - The <parameter>return</parameter> parameter became available in PHP - 4.2.0. Before this time it behaved like the default, which is &false; - </simpara> - </note> - <note> - <simpara> - Since PHP 4.2.1 this function is also affected by <link - linkend="ini.safe-mode">safe_mode</link> and <link - linkend="ini.open-basedir">open_basedir</link>. - </simpara> - </note> - <caution> - <simpara> - Care should be taken when using the - <function>highlight_file</function> function to make sure that - you do not inadvertently reveal sensitive information such as - passwords or any other type of information that might create a - potential security risk. - </simpara> - </caution> - <para> - Many servers are configured to automatically highlight files - with a <emphasis>phps</emphasis> extension. For example, - <filename>example.phps</filename> when viewed will show the - syntax highlighted source of the file. To enable this, add this - line to the &httpd.conf;: - </para> - <screen> +<refentry id="function.highlight-file"> + <refnamediv> + <refname>highlight_file</refname> + <refpurpose>Syntax highlighting of a file</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>highlight_file</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam> + </methodsynopsis> + <simpara> + The <function>highlight_file</function> function prints out a syntax + highlighted version of the code contained in <parameter>filename</parameter> + using the colors defined in the built-in syntax highlighter for PHP. + </simpara> + <simpara> + If the second parameter <parameter>return</parameter> is set to &true; + then <function>highlight_file</function> will return the highlighted + code as a string instead of printing it out. If the second parameter is + not set to &true; then <function>highlight_file</function> will + return &true; on success, &false; on failure. + </simpara> + &note.uses-ob; + <note> + <simpara> + The <parameter>return</parameter> parameter became available in PHP + 4.2.0. Before this time it behaved like the default, which is &false; + </simpara> + </note> + <note> + <simpara> + Since PHP 4.2.1 this function is also affected by <link + linkend="ini.safe-mode">safe_mode</link> and <link + linkend="ini.open-basedir">open_basedir</link>. + </simpara> + </note> + <caution> + <simpara> + Care should be taken when using the + <function>highlight_file</function> function to make sure that + you do not inadvertently reveal sensitive information such as + passwords or any other type of information that might create a + potential security risk. + </simpara> + </caution> + <para> + Many servers are configured to automatically highlight files + with a <emphasis>phps</emphasis> extension. For example, + <filename>example.phps</filename> when viewed will show the + syntax highlighted source of the file. To enable this, add this + line to the &httpd.conf;: + </para> + <screen> <![CDATA[ AddType application/x-httpd-php-source .phps ]]> - </screen> - <simpara> - See also <function>highlight_string</function>. - </simpara> - </refsect1> - </refentry> + </screen> + <simpara> + See also <function>highlight_string</function>. + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/highlight-string.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/misc/functions/highlight-string.xml diff -u phpdoc/en/reference/misc/functions/highlight-string.xml:1.6 phpdoc/en/reference/misc/functions/highlight-string.xml:1.7 --- phpdoc/en/reference/misc/functions/highlight-string.xml:1.6 Tue Mar 7 01:12:15 2006 +++ phpdoc/en/reference/misc/functions/highlight-string.xml Mon Feb 19 00:02:49 2007 @@ -1,76 +1,76 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 --> - <refentry id="function.highlight-string"> - <refnamediv> - <refname>highlight_string</refname> - <refpurpose>Syntax highlighting of a string</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>highlight_string</methodname> - <methodparam><type>string</type><parameter>str</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam> - </methodsynopsis> - <simpara> - The <function>highlight_string</function> function outputs a syntax - highlighted version of <parameter>str</parameter> using the colors defined - in the built-in syntax highlighter for PHP. - </simpara> - <simpara> - If the second parameter <parameter>return</parameter> is set to &true; - then <function>highlight_string</function> will return the highlighted - code as a string instead of printing it out. If the second parameter is - not set to &true; then <function>highlight_string</function> will - return &true; on success, &false; on failure. - </simpara> - &note.uses-ob; - <para> - <example> - <title><function>highlight_string</function> example</title> - <programlisting role="php"> +<refentry id="function.highlight-string"> + <refnamediv> + <refname>highlight_string</refname> + <refpurpose>Syntax highlighting of a string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>highlight_string</methodname> + <methodparam><type>string</type><parameter>str</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam> + </methodsynopsis> + <simpara> + The <function>highlight_string</function> function outputs a syntax + highlighted version of <parameter>str</parameter> using the colors defined + in the built-in syntax highlighter for PHP. + </simpara> + <simpara> + If the second parameter <parameter>return</parameter> is set to &true; + then <function>highlight_string</function> will return the highlighted + code as a string instead of printing it out. If the second parameter is + not set to &true; then <function>highlight_string</function> will + return &true; on success, &false; on failure. + </simpara> + &note.uses-ob; + <para> + <example> + <title><function>highlight_string</function> example</title> + <programlisting role="php"> <![CDATA[ <?php highlight_string('<?php phpinfo(); ?>'); ?> ]]> - </programlisting> - <para> - The above example will output (in PHP 4): - </para> - <screen> + </programlisting> + <para> + The above example will output (in PHP 4): + </para> + <screen> <![CDATA[ <code><font color="#000000"> <font color="#0000BB">&lt;?php phpinfo</font><font color="#007700">(); </font><font color="#0000BB">?&gt;</font> </font> </code> ]]> - </screen> - <para> - The above example will output (in PHP 5): - </para> - <screen> + </screen> + <para> + The above example will output (in PHP 5): + </para> + <screen> <![CDATA[ <code><span style="color: #000000"> <span style="color: #0000BB">&lt;?php phpinfo</span><span style="color: #007700">(); </span><span style="color: #0000BB">?&gt;</span> </span> </code> ]]> - </screen> - </example> - </para> - <note> - <simpara> - The <parameter>return</parameter> parameter became available in PHP - 4.2.0. Before this time it behaved like the default, which is &false; - </simpara> - </note> - <simpara> - See also <function>highlight_file</function>. - </simpara> - </refsect1> - </refentry> + </screen> + </example> + </para> + <note> + <simpara> + The <parameter>return</parameter> parameter became available in PHP + 4.2.0. Before this time it behaved like the default, which is &false; + </simpara> + </note> + <simpara> + See also <function>highlight_file</function>. + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/ignore-user-abort.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/misc/functions/ignore-user-abort.xml diff -u phpdoc/en/reference/misc/functions/ignore-user-abort.xml:1.3 phpdoc/en/reference/misc/functions/ignore-user-abort.xml:1.4 --- phpdoc/en/reference/misc/functions/ignore-user-abort.xml:1.3 Mon Jul 14 22:57:14 2003 +++ phpdoc/en/reference/misc/functions/ignore-user-abort.xml Mon Feb 19 00:02:49 2007 @@ -1,34 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.ignore-user-abort"> - <refnamediv> - <refname>ignore_user_abort</refname> - <refpurpose> - Set whether a client disconnect should abort script execution - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>ignore_user_abort</methodname> - <methodparam choice="opt"><type>bool</type><parameter>setting</parameter></methodparam> - </methodsynopsis> - <simpara> - This function sets whether a client disconnect should cause a - script to be aborted. It will return the previous setting and - can be called without an argument to not change the current - setting and only return the current setting. See the <link - linkend="features.connection-handling">Connection Handling</link> - section in the <link linkend="features">Features</link> chapter - for a complete description of connection handling in PHP. - </simpara> - <para> - See also <function>connection_aborted</function>, and - <function>connection_status</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.ignore-user-abort"> + <refnamediv> + <refname>ignore_user_abort</refname> + <refpurpose>Set whether a client disconnect should abort script execution</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>ignore_user_abort</methodname> + <methodparam choice="opt"><type>bool</type><parameter>setting</parameter></methodparam> + </methodsynopsis> + <simpara> + This function sets whether a client disconnect should cause a + script to be aborted. It will return the previous setting and + can be called without an argument to not change the current + setting and only return the current setting. See the <link + linkend="features.connection-handling">Connection Handling</link> + section in the <link linkend="features">Features</link> chapter + for a complete description of connection handling in PHP. + </simpara> + <para> + See also <function>connection_aborted</function>, and + <function>connection_status</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/pack.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/misc/functions/pack.xml diff -u phpdoc/en/reference/misc/functions/pack.xml:1.6 phpdoc/en/reference/misc/functions/pack.xml:1.7 --- phpdoc/en/reference/misc/functions/pack.xml:1.6 Sun Aug 8 01:30:40 2004 +++ phpdoc/en/reference/misc/functions/pack.xml Mon Feb 19 00:02:49 2007 @@ -1,107 +1,108 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.4 --> - <refentry id="function.pack"> - <refnamediv> - <refname>pack</refname> - <refpurpose>Pack data into binary string</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>pack</methodname> - <methodparam><type>string</type><parameter>format</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>args</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> - </methodsynopsis> - <para> - Pack given arguments into binary string according to - <parameter>format</parameter>. Returns binary string containing - data. - </para> - <para> - The idea to this function was taken from Perl and all formatting - codes work the same as there, however, there are some formatting - codes that are missing such as Perl's "u" format code. The format - string consists of format codes followed by an optional repeater - argument. The repeater argument can be either an integer value or - * for repeating to the end of the input data. For a, A, h, H the - repeat count specifies how many characters of one data argument - are taken, for @ it is the absolute position where to put the - next data, for everything else the repeat count specifies how - many data arguments are consumed and packed into the resulting - binary string. Currently implemented are - </para> - <para> - <table> - <title><function>pack</function> format characters</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Code</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row><entry>a</entry><entry>NUL-padded string</entry></row> - <row><entry>A</entry><entry>SPACE-padded string</entry></row> - <row><entry>h</entry><entry>Hex string, low nibble first</entry></row> - <row><entry>H</entry><entry>Hex string, high nibble first</entry></row> - <row><entry>c</entry><entry>signed char</entry></row> - <row><entry>C</entry><entry>unsigned char</entry></row> - <row><entry>s</entry><entry>signed short (always 16 bit, machine byte order)</entry></row> - <row><entry>S</entry><entry>unsigned short (always 16 bit, machine byte order)</entry></row> - <row><entry>n</entry><entry>unsigned short (always 16 bit, big endian byte order)</entry></row> - <row><entry>v</entry><entry>unsigned short (always 16 bit, little endian byte order)</entry></row> - <row><entry>i</entry><entry>signed integer (machine dependent size and byte order)</entry></row> - <row><entry>I</entry><entry>unsigned integer (machine dependent size and byte order)</entry></row> - <row><entry>l</entry><entry>signed long (always 32 bit, machine byte order)</entry></row> - <row><entry>L</entry><entry>unsigned long (always 32 bit, machine byte order)</entry></row> - <row><entry>N</entry><entry>unsigned long (always 32 bit, big endian byte order)</entry></row> - <row><entry>V</entry><entry>unsigned long (always 32 bit, little endian byte order)</entry></row> - <row><entry>f</entry><entry>float (machine dependent size and representation)</entry></row> - <row><entry>d</entry><entry>double (machine dependent size and representation)</entry></row> - <row><entry>x</entry><entry>NUL byte</entry></row> - <row><entry>X</entry><entry>Back up one byte</entry></row> - <row><entry>@</entry><entry>NUL-fill to absolute position</entry></row> - </tbody> - </tgroup> - </table> - </para> - <para> - <example> - <title><function>pack</function> example</title> - <programlisting role="php"> +<refentry id="function.pack"> + <refnamediv> + <refname>pack</refname> + <refpurpose>Pack data into binary string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>pack</methodname> + <methodparam><type>string</type><parameter>format</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>args</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> + </methodsynopsis> + <para> + Pack given arguments into binary string according to + <parameter>format</parameter>. Returns binary string containing + data. + </para> + <para> + The idea to this function was taken from Perl and all formatting + codes work the same as there, however, there are some formatting + codes that are missing such as Perl's "u" format code. The format + string consists of format codes followed by an optional repeater + argument. The repeater argument can be either an integer value or + * for repeating to the end of the input data. For a, A, h, H the + repeat count specifies how many characters of one data argument + are taken, for @ it is the absolute position where to put the + next data, for everything else the repeat count specifies how + many data arguments are consumed and packed into the resulting + binary string. Currently implemented are + </para> + <para> + <table> + <title><function>pack</function> format characters</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Code</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row><entry>a</entry><entry>NUL-padded string</entry></row> + <row><entry>A</entry><entry>SPACE-padded string</entry></row> + <row><entry>h</entry><entry>Hex string, low nibble first</entry></row> + <row><entry>H</entry><entry>Hex string, high nibble first</entry></row> + <row><entry>c</entry><entry>signed char</entry></row> + <row><entry>C</entry><entry>unsigned char</entry></row> + <row><entry>s</entry><entry>signed short (always 16 bit, machine byte order)</entry></row> + <row><entry>S</entry><entry>unsigned short (always 16 bit, machine byte order)</entry></row> + <row><entry>n</entry><entry>unsigned short (always 16 bit, big endian byte order)</entry></row> + <row><entry>v</entry><entry>unsigned short (always 16 bit, little endian byte order)</entry></row> + <row><entry>i</entry><entry>signed integer (machine dependent size and byte order)</entry></row> + <row><entry>I</entry><entry>unsigned integer (machine dependent size and byte order)</entry></row> + <row><entry>l</entry><entry>signed long (always 32 bit, machine byte order)</entry></row> + <row><entry>L</entry><entry>unsigned long (always 32 bit, machine byte order)</entry></row> + <row><entry>N</entry><entry>unsigned long (always 32 bit, big endian byte order)</entry></row> + <row><entry>V</entry><entry>unsigned long (always 32 bit, little endian byte order)</entry></row> + <row><entry>f</entry><entry>float (machine dependent size and representation)</entry></row> + <row><entry>d</entry><entry>double (machine dependent size and representation)</entry></row> + <row><entry>x</entry><entry>NUL byte</entry></row> + <row><entry>X</entry><entry>Back up one byte</entry></row> + <row><entry>@</entry><entry>NUL-fill to absolute position</entry></row> + </tbody> + </tgroup> + </table> + </para> + <para> + <example> + <title><function>pack</function> example</title> + <programlisting role="php"> <![CDATA[ <?php $binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66); ?> ]]> - </programlisting> - <para> - The resulting binary string will be 6 bytes long and contain - the byte sequence 0x12, 0x34, 0x78, 0x56, 0x41, 0x42. - </para> - </example> - </para> - <para> - Note that the distinction between signed and unsigned values only - affects the function <function>unpack</function>, where as - function <function>pack</function> gives the same result for - signed and unsigned format codes. - </para> - <para> - Also note that PHP internally stores <type>integer</type> values as - signed values of a machine dependent size. If you give it an unsigned - integer value too large to be stored that way it is converted to a - <type>float</type> which often yields an undesired result. - </para> + </programlisting> <para> - See also - <function>unpack</function>. + The resulting binary string will be 6 bytes long and contain + the byte sequence 0x12, 0x34, 0x78, 0x56, 0x41, 0x42. </para> - </refsect1> - </refentry> + </example> + </para> + <para> + Note that the distinction between signed and unsigned values only + affects the function <function>unpack</function>, where as + function <function>pack</function> gives the same result for + signed and unsigned format codes. + </para> + <para> + Also note that PHP internally stores <type>integer</type> values as + signed values of a machine dependent size. If you give it an unsigned + integer value too large to be stored that way it is converted to a + <type>float</type> which often yields an undesired result. + </para> + <para> + See also + <function>unpack</function>. + </para> + </refsect1> +</refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/php-strip-whitespace.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/misc/functions/php-strip-whitespace.xml diff -u phpdoc/en/reference/misc/functions/php-strip-whitespace.xml:1.5 phpdoc/en/reference/misc/functions/php-strip-whitespace.xml:1.6 --- phpdoc/en/reference/misc/functions/php-strip-whitespace.xml:1.5 Tue Sep 7 12:21:48 2004 +++ phpdoc/en/reference/misc/functions/php-strip-whitespace.xml Mon Feb 19 00:02:49 2007 @@ -1,11 +1,9 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.php-strip-whitespace"> <refnamediv> <refname>php_strip_whitespace</refname> - <refpurpose> - Return source with stripped comments and whitespace - </refpurpose> + <refpurpose>Return source with stripped comments and whitespace</refpurpose> </refnamediv> <refsect1> &reftitle.description; http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/sleep.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/misc/functions/sleep.xml diff -u phpdoc/en/reference/misc/functions/sleep.xml:1.8 phpdoc/en/reference/misc/functions/sleep.xml:1.9 --- phpdoc/en/reference/misc/functions/sleep.xml:1.8 Fri Jun 24 09:11:46 2005 +++ phpdoc/en/reference/misc/functions/sleep.xml Mon Feb 19 00:02:49 2007 @@ -1,25 +1,25 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.sleep"> - <refnamediv> - <refname>sleep</refname> - <refpurpose>Delay execution</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>sleep</methodname> - <methodparam><type>int</type><parameter>seconds</parameter></methodparam> - </methodsynopsis> - <simpara> - The <function>sleep</function> function delays program execution for the - given number of <parameter>seconds</parameter>. - </simpara> - <para> - <example> - <title><function>sleep</function> example</title> - <programlisting role="php"> +<refentry id="function.sleep"> + <refnamediv> + <refname>sleep</refname> + <refpurpose>Delay execution</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>sleep</methodname> + <methodparam><type>int</type><parameter>seconds</parameter></methodparam> + </methodsynopsis> + <simpara> + The <function>sleep</function> function delays program execution for the + given number of <parameter>seconds</parameter>. + </simpara> + <para> + <example> + <title><function>sleep</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -34,24 +34,24 @@ ?> ]]> - </programlisting> - <para> - This example will output (after 10 seconds) - </para> - <screen> + </programlisting> + <para> + This example will output (after 10 seconds) + </para> + <screen> <![CDATA[ 05:31:23 05:31:33 ]]> - </screen> - </example> - </para> - <simpara> - See also <function>usleep</function> and - <function>set_time_limit</function> - </simpara> - </refsect1> - </refentry> + </screen> + </example> + </para> + <simpara> + See also <function>usleep</function> and + <function>set_time_limit</function> + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/time-nanosleep.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/misc/functions/time-nanosleep.xml diff -u phpdoc/en/reference/misc/functions/time-nanosleep.xml:1.5 phpdoc/en/reference/misc/functions/time-nanosleep.xml:1.6 --- phpdoc/en/reference/misc/functions/time-nanosleep.xml:1.5 Sun Dec 19 12:33:30 2004 +++ phpdoc/en/reference/misc/functions/time-nanosleep.xml Mon Feb 19 00:02:49 2007 @@ -1,11 +1,9 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.time-nanosleep"> <refnamediv> <refname>time_nanosleep</refname> - <refpurpose> - Delay for a number of seconds and nanoseconds - </refpurpose> + <refpurpose>Delay for a number of seconds and nanoseconds</refpurpose> </refnamediv> <refsect1> &reftitle.description; http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/uniqid.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/misc/functions/uniqid.xml diff -u phpdoc/en/reference/misc/functions/uniqid.xml:1.9 phpdoc/en/reference/misc/functions/uniqid.xml:1.10 --- phpdoc/en/reference/misc/functions/uniqid.xml:1.9 Fri Jun 23 21:22:07 2006 +++ phpdoc/en/reference/misc/functions/uniqid.xml Mon Feb 19 00:02:49 2007 @@ -1,51 +1,51 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> - <refentry id="function.uniqid"> - <refnamediv> - <refname>uniqid</refname> - <refpurpose>Generate a unique ID</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>uniqid</methodname> - <methodparam choice="opt"><type>string</type><parameter>prefix</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>more_entropy</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>uniqid</function> returns a prefixed unique identifier - based on the current time in microseconds. <parameter>prefix</parameter> - became optional in PHP 5 but can be useful, for instance, if you generate identifiers - simultaneously on several hosts that might happen to generate the - identifier at the same microsecond. Up until PHP 4.3.1, - <parameter>prefix</parameter> could only be a maximum of 114 - characters long. - </simpara> - <simpara> - If the optional <parameter>more_entropy</parameter> parameter is - &true;, <function>uniqid</function> will add additional entropy (using - the combined linear congruential generator) at the end of the return - value, which should make the results more unique. - </simpara> - <simpara> - With an empty <parameter>prefix</parameter>, the returned string - will be 13 characters long. If <parameter>more_entropy</parameter> is - &true;, it will be 23 characters. - </simpara> - <note> - <simpara> - The <parameter>prefix</parameter> parameter is required before PHP 5. - </simpara> - </note> - <para> - If you need a unique identifier or token and you intend to give - out that token to the user via the network (i.e. session cookies), - it is recommended that you use something along these lines: - </para> - <para> - <informalexample> - <programlisting role="php"> +<refentry id="function.uniqid"> + <refnamediv> + <refname>uniqid</refname> + <refpurpose>Generate a unique ID</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>uniqid</methodname> + <methodparam choice="opt"><type>string</type><parameter>prefix</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>more_entropy</parameter></methodparam> + </methodsynopsis> + <simpara> + <function>uniqid</function> returns a prefixed unique identifier + based on the current time in microseconds. <parameter>prefix</parameter> + became optional in PHP 5 but can be useful, for instance, if you generate identifiers + simultaneously on several hosts that might happen to generate the + identifier at the same microsecond. Up until PHP 4.3.1, + <parameter>prefix</parameter> could only be a maximum of 114 + characters long. + </simpara> + <simpara> + If the optional <parameter>more_entropy</parameter> parameter is + &true;, <function>uniqid</function> will add additional entropy (using + the combined linear congruential generator) at the end of the return + value, which should make the results more unique. + </simpara> + <simpara> + With an empty <parameter>prefix</parameter>, the returned string + will be 13 characters long. If <parameter>more_entropy</parameter> is + &true;, it will be 23 characters. + </simpara> + <note> + <simpara> + The <parameter>prefix</parameter> parameter is required before PHP 5. + </simpara> + </note> + <para> + If you need a unique identifier or token and you intend to give + out that token to the user via the network (i.e. session cookies), + it is recommended that you use something along these lines: + </para> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ <?php // no prefix @@ -56,15 +56,15 @@ $better_token = md5(uniqid(rand(), true)); ?> ]]> - </programlisting> - </informalexample> - </para> - <simpara> - This will create a 32 character identifier (a 128 bit hex number) - that is extremely difficult to predict. - </simpara> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + <simpara> + This will create a 32 character identifier (a 128 bit hex number) + that is extremely difficult to predict. + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/unpack.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/misc/functions/unpack.xml diff -u phpdoc/en/reference/misc/functions/unpack.xml:1.4 phpdoc/en/reference/misc/functions/unpack.xml:1.5 --- phpdoc/en/reference/misc/functions/unpack.xml:1.4 Wed Jul 16 17:36:24 2003 +++ phpdoc/en/reference/misc/functions/unpack.xml Mon Feb 19 00:02:49 2007 @@ -1,57 +1,57 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 --> - <refentry id="function.unpack"> - <refnamediv> - <refname>unpack</refname> - <refpurpose>Unpack data from binary string</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>array</type><methodname>unpack</methodname> - <methodparam><type>string</type><parameter>format</parameter></methodparam> - <methodparam><type>string</type><parameter>data</parameter></methodparam> - </methodsynopsis> - <para> - <function>unpack</function> from binary string into array - according to <parameter>format</parameter>. Returns array - containing unpacked elements of binary string. - </para> - <para> - <function>unpack</function> works slightly different from Perl as - the unpacked data is stored in an associative array. To - accomplish this you have to name the different format codes and - separate them by a slash /. - <example> - <title><function>unpack</function> example</title> - <programlisting role="php"> +<refentry id="function.unpack"> + <refnamediv> + <refname>unpack</refname> + <refpurpose>Unpack data from binary string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>array</type><methodname>unpack</methodname> + <methodparam><type>string</type><parameter>format</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + </methodsynopsis> + <para> + <function>unpack</function> from binary string into array + according to <parameter>format</parameter>. Returns array + containing unpacked elements of binary string. + </para> + <para> + <function>unpack</function> works slightly different from Perl as + the unpacked data is stored in an associative array. To + accomplish this you have to name the different format codes and + separate them by a slash /. + <example> + <title><function>unpack</function> example</title> + <programlisting role="php"> <![CDATA[ <?php $array = unpack("c2chars/nint", $binarydata); ?> ]]> - </programlisting> - <para> - The resulting array will contain the entries "chars1", - "chars2" and "int". - </para> - </example> - </para> - <caution> - <para> - Note that PHP internally stores integral values as signed. If you - unpack a large unsigned long and it is of the same size as PHP - internally stored values the result will be a negative number - even though unsigned unpacking was specified. - </para> - </caution> + </programlisting> <para> - See also <function>pack</function> for an explanation of the format - codes. + The resulting array will contain the entries "chars1", + "chars2" and "int". </para> - </refsect1> - </refentry> + </example> + </para> + <caution> + <para> + Note that PHP internally stores integral values as signed. If you + unpack a large unsigned long and it is of the same size as PHP + internally stored values the result will be a negative number + even though unsigned unpacking was specified. + </para> + </caution> + <para> + See also <function>pack</function> for an explanation of the format + codes. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/usleep.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/misc/functions/usleep.xml diff -u phpdoc/en/reference/misc/functions/usleep.xml:1.8 phpdoc/en/reference/misc/functions/usleep.xml:1.9 --- phpdoc/en/reference/misc/functions/usleep.xml:1.8 Mon Jan 22 15:48:48 2007 +++ phpdoc/en/reference/misc/functions/usleep.xml Mon Feb 19 00:02:49 2007 @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.14 --> - <refentry id="function.usleep"> - <refnamediv> - <refname>usleep</refname> - <refpurpose>Delay execution in microseconds</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>usleep</methodname> - <methodparam><type>int</type><parameter>micro_seconds</parameter></methodparam> - </methodsynopsis> - <simpara> - The <function>usleep</function> function delays program execution - for the given number of <parameter>micro_seconds</parameter>. A - microsecond is one millionth of a second. - </simpara> - <para> - <example> - <title><function>usleep</function> example</title> - <programlisting role="php"> +<refentry id="function.usleep"> + <refnamediv> + <refname>usleep</refname> + <refpurpose>Delay execution in microseconds</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>usleep</methodname> + <methodparam><type>int</type><parameter>micro_seconds</parameter></methodparam> + </methodsynopsis> + <simpara> + The <function>usleep</function> function delays program execution + for the given number of <parameter>micro_seconds</parameter>. A + microsecond is one millionth of a second. + </simpara> + <para> + <example> + <title><function>usleep</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -35,29 +35,29 @@ ?> ]]> - </programlisting> - <para> - This script will output : - </para> - <screen> + </programlisting> + <para> + This script will output : + </para> + <screen> <![CDATA[ 11:13:28 11:13:30 ]]> - </screen> - </example> - </para> - <note> - <simpara> - This function did not work on Windows systems until PHP 5.0.0 - </simpara> - </note> - <simpara> - See also <function>sleep</function> and - <function>set_time_limit</function>. - </simpara> - </refsect1> - </refentry> + </screen> + </example> + </para> + <note> + <simpara> + This function did not work on Windows systems until PHP 5.0.0 + </simpara> + </note> + <simpara> + See also <function>sleep</function> and + <function>set_time_limit</function>. + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables:
« previous php.doc (#969375515) next »