<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="random-engine-mt19937.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>Random\Engine\Mt19937::__construct</refname>
  <refpurpose>Constructs a new Mt19937 engine</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <constructorsynopsis role="Random\\Engine\\Mt19937">
   <modifier>public</modifier> <methodname>Random\Engine\Mt19937::__construct</methodname>
   <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>seed</parameter><initializer>&null;</initializer></methodparam>
   <methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>MT_RAND_MT19937</constant></initializer></methodparam>
  </constructorsynopsis>
  <para>

  </para>

  &caution.mt19937-tiny-seed;

  &warn.undocumented.func;

 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>seed</parameter></term>
    <listitem>
     <para>
      Fills the state with values generated with a linear congruential generator
      that was seeded with <parameter>seed</parameter> interpreted as an unsigned
      32 bit integer.
     </para>

     <para>
      If <parameter>seed</parameter> is omitted or &null;, a random unsigned
      32 bit integer will be used.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>mode</parameter></term>
    <listitem>
     <para>
      Use one of the following constants to specify the implementation of the algorithm to use.
      <simplelist>
       <member>
        <constant>MT_RAND_MT19937</constant>:
        The correct Mt19937 implementation.
       </member>
       <member>
        <constant>MT_RAND_PHP</constant>:
        An incorrect implementation for backwards compatibility with <function>mt_srand</function> prior to
        PHP 7.1.0.
       </member>
      </simplelist>
     </para>
     &warn.deprecated.feature-8-3-0;
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <!-- Return values commented out, as constructors generally don't return a
      value. Uncomment this if you do need a return values section (for
      example, because there's also a procedural version of the method).
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>

  </para>
 </refsect1>
 -->


 <refsect1 role="examples">
  &reftitle.examples;
  <example>
   <title><function>Random\Engine\Mt19937::__construct</function> example</title>
   <programlisting role="php">
<![CDATA[
<?php
// Uses a random 32 Bit seed.
$e = new \Random\Engine\Mt19937();

$r = new \Random\Randomizer($e);
?>
]]>
   </programlisting>
  </example>
 </refsect1>


</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
