mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

https://wiki.php.net/rfc/rng_extension https://wiki.php.net/rfc/random_extension_improvement
24 lines
537 B
PHP
24 lines
537 B
PHP
--TEST--
|
|
Test mt_srand() - basic function (return values) mt_srand()
|
|
--FILE--
|
|
<?php
|
|
// Should return NULL if given anything that it can convert to long
|
|
// This doesn't actually test what it does with the input :-\
|
|
var_dump(mt_srand());
|
|
var_dump(mt_srand(500));
|
|
var_dump(mt_srand(500.1));
|
|
var_dump(mt_srand("500"));
|
|
var_dump(mt_srand("500E3"));
|
|
var_dump(mt_srand(true));
|
|
var_dump(mt_srand(false));
|
|
?>
|
|
--EXPECTF--
|
|
NULL
|
|
NULL
|
|
|
|
Deprecated: Implicit conversion from float 500.1 to int loses precision in %s on line %d
|
|
NULL
|
|
NULL
|
|
NULL
|
|
NULL
|
|
NULL
|