W3cubDocs

/PHP

The Random\Engine\Mt19937 class

Introduction

(PHP 8 >= 8.2.0)

Implements the » Mt19937 (“Mersenne Twister”) algorithm.

Class synopsis

final class Random\Engine\Mt19937 implements Random\Engine {
/* Methods */
public __construct(?int $seed = null, int $mode = MT_RAND_MT19937)
public __debugInfo(): array
public generate(): string
public __serialize(): array
public __unserialize(array $data): void
}

Table of Contents

© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.random-engine-mt19937.php