略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: 预定义常量

2025-02-27

预定义常量

下列常量作为 PHP 核心的一部分总是可用的。

MT_RAND_MT19937 (int)
Indicates that the correct » Mt19937 (Mersenne Twister) implementation will be used by the algorithm, when creating a Random\Engine\Mt19937 instance using Random\Engine\Mt19937::__construct() or seeding the global Mersenne Twister with mt_srand().
MT_RAND_PHP (int)
Indicates that an incorrect Mersenne Twister implementation will be used by the algorithm, when creating a Random\Engine\Mt19937 instance using Random\Engine\Mt19937::__construct() or seeding the global Mersenne Twister with mt_srand(). The incorrect implementation is available for backwards compatibility with mt_srand() prior to PHP 7.1.0.
警告

本特性已自 PHP 8.3.0 起废弃。强烈建议不要使用本特性。

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/random.constants.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3