cvs: phpdoc /en/reference/misc/functions get-browser.xml highlight-file.xml highlight-string.xml pack.xml usleep.xml

From: Date: Thu, 06 May 2004 15:25:38 +0000
Subject: cvs: phpdoc /en/reference/misc/functions get-browser.xml highlight-file.xml highlight-string.xml pack.xml usleep.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969360523@lists.php.net to get a copy of this message
dams Thu May 6 11:25:38 2004 EDT Modified files: /phpdoc/en/reference/misc/functions get-browser.xml highlight-file.xml highlight-string.xml pack.xml usleep.xml Log: cosmetics and examples http://cvs.php.net/diff.php/phpdoc/en/reference/misc/functions/get-browser.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/misc/functions/get-browser.xml diff -u phpdoc/en/reference/misc/functions/get-browser.xml:1.9 phpdoc/en/reference/misc/functions/get-browser.xml:1.10 --- phpdoc/en/reference/misc/functions/get-browser.xml:1.9 Mon Dec 15 11:52:03 2003 +++ phpdoc/en/reference/misc/functions/get-browser.xml Thu May 6 11:25:38 2004 @@ -1,5 +1,5 @@ <?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.get-browser"> <refnamediv> @@ -18,7 +18,7 @@ <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. By default, the value of <varname>HTTP_USER_AGENT</varname> is + file. By default, the value of <varname>$_SERVER["HTTP_USER_AGENT"]</varname> 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 http://cvs.php.net/diff.php/phpdoc/en/reference/misc/functions/highlight-file.xml?r1=1.15&r2=1.16&ty=u Index: phpdoc/en/reference/misc/functions/highlight-file.xml diff -u phpdoc/en/reference/misc/functions/highlight-file.xml:1.15 phpdoc/en/reference/misc/functions/highlight-file.xml:1.16 --- phpdoc/en/reference/misc/functions/highlight-file.xml:1.15 Tue Feb 17 09:08:27 2004 +++ phpdoc/en/reference/misc/functions/highlight-file.xml Thu May 6 11:25:38 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> +<!-- $Revision: 1.16 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 --> <refentry id="function.highlight-file"> <refnamediv> @@ -70,7 +70,7 @@ ]]> </programlisting> <simpara> - And then make a file named "source" and put it in your + And then make a file named <filename>source</filename> and put it in your web root directory. </simpara> <programlisting role="php"> http://cvs.php.net/diff.php/phpdoc/en/reference/misc/functions/highlight-string.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/misc/functions/highlight-string.xml diff -u phpdoc/en/reference/misc/functions/highlight-string.xml:1.3 phpdoc/en/reference/misc/functions/highlight-string.xml:1.4 --- phpdoc/en/reference/misc/functions/highlight-string.xml:1.3 Tue Jun 10 02:56:16 2003 +++ phpdoc/en/reference/misc/functions/highlight-string.xml Thu May 6 11:25:38 2004 @@ -1,5 +1,5 @@ <?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.22 --> <refentry id="function.highlight-string"> <refnamediv> @@ -25,6 +25,29 @@ not set to &true; then <function>highlight_string</function> will return &true; on success, &false; on failure. </simpara> + <para> + <example> + <title><function>highlight_string</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +highlight_string('<?php phpinfo(); ?>'); +?> +]]> + </programlisting> + <para> + This script will output: + <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> + </example> + </para> <note> <simpara> The <parameter>return</parameter> parameter became available in PHP http://cvs.php.net/diff.php/phpdoc/en/reference/misc/functions/pack.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/misc/functions/pack.xml diff -u phpdoc/en/reference/misc/functions/pack.xml:1.3 phpdoc/en/reference/misc/functions/pack.xml:1.4 --- phpdoc/en/reference/misc/functions/pack.xml:1.3 Sat Jun 21 06:28:05 2003 +++ phpdoc/en/reference/misc/functions/pack.xml Thu May 6 11:25:38 2004 @@ -1,5 +1,5 @@ <?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.4 --> <refentry id="function.pack"> <refnamediv> @@ -95,6 +95,10 @@ 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 http://cvs.php.net/diff.php/phpdoc/en/reference/misc/functions/usleep.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/misc/functions/usleep.xml diff -u phpdoc/en/reference/misc/functions/usleep.xml:1.5 phpdoc/en/reference/misc/functions/usleep.xml:1.6 --- phpdoc/en/reference/misc/functions/usleep.xml:1.5 Wed May 5 05:30:55 2004 +++ phpdoc/en/reference/misc/functions/usleep.xml Thu May 6 11:25:38 2004 @@ -1,5 +1,5 @@ <?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.14 --> <refentry id="function.usleep"> <refnamediv> @@ -17,6 +17,36 @@ for the given number of <parameter>micro_seconds</parameter>. A microsecond is one millionth of a second. </simpara> + <para> + <example> + <title>Exemple avec <function>sleep</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// Current time +echo date('h:i:s') . "\n"; + +// wait for 2 secondes +usleep(2000000); + +// back! +echo date('h:i:s') . "\n"; + +?> +]]> + </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

« previous php.doc (#969360523) next »