cvs: phpdoc-de /reference/math/functions srand.xml

From: Date: Tue, 03 Apr 2007 20:47:20 +0000
Subject: cvs: phpdoc-de /reference/math/functions srand.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-2132@lists.php.net to get a copy of this message
hholzgra Tue Apr 3 20:47:20 2007 UTC Modified files: /phpdoc-de/reference/math/functions srand.xml Log: added missing example http://cvs.php.net/viewvc.cgi/phpdoc-de/reference/math/functions/srand.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-de/reference/math/functions/srand.xml diff -u phpdoc-de/reference/math/functions/srand.xml:1.6 phpdoc-de/reference/math/functions/srand.xml:1.7 --- phpdoc-de/reference/math/functions/srand.xml:1.6 Mon Apr 2 12:11:52 2007 +++ phpdoc-de/reference/math/functions/srand.xml Tue Apr 3 20:47:20 2007 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 --> -<!-- EN-Revision: 1.11 Maintainer: hholzgra Status: ready --> +<!-- EN-Revision: 1.12 Maintainer: hholzgra Status: ready --> <refentry id="function.srand"> <refnamediv> <refname>srand</refname> @@ -61,6 +61,28 @@ </informaltable> </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>srand</function> Beispiel</title> + <programlisting role="php"> +<![CDATA[ +<?php +// Anfagswert über aktuelle Mikrosekunde setzen +function make_seed() +{ + list($usec, $sec) = explode(' ', microtime()); + return (float) $sec + ((float) $usec * 100000); +} +srand(make_seed()); +$randval = rand(); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para>

« previous php.doc.de (#2132) next »