Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс RandomSequence

Открытые члены

 __construct ($seed="")
 
 getNext ()
 
 rand ($min, $max)
 
 randString ($length=10)
 

Подробное описание

Class for generating pseudo random sequences. Never use it for any security or cryptographic purposes.

use \Bitrix\Main\Type\RandomSequence; $rs = new RandomSequence("A"); echo $rs->randString();

См. определение в файле randomsequence.php строка 13

Конструктор(ы)

◆ __construct()

__construct ( $seed = "")

Starts new sequence of pseudo random values.

Аргументы
string$seed
Возвращает
void

См. определение в файле randomsequence.php строка 24

Методы

◆ getNext()

getNext ( )

Returns next pseudo random value from the sequence. The result is signed 32 bit integer.

Возвращает
int

См. определение в файле randomsequence.php строка 37

◆ rand()

rand ( $min,
$max )

Returns next pseudo random number value from the sequence. between $min and $max including borders.

Аргументы
int$min
int$max
Возвращает
int
Исключения

Bitrix\Main\NotSupportedException

См. определение в файле randomsequence.php строка 69

◆ randString()

randString ( $length = 10)

Returns next pseudo random string value from the sequence.

Аргументы
int$length
Возвращает
string

См. определение в файле randomsequence.php строка 84