1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/ext/standard/tests/math/mt_srand_error.phpt
T
Leigh 69e7d8dcd5 Make mode selection part of mt_srand()
The mode of operation is intrinsically linked to seeding, so this makes a lot of sense
2016-07-07 15:14:06 +01:00

21 lines
431 B
PHP

--TEST--
Test mt_srand() - wrong params test mt_srand()
--FILE--
<?php
var_dump(mt_srand(500, 0, true));
var_dump(mt_srand("fivehundred"));
var_dump(mt_srand("500ABC"));
?>
--EXPECTF--
Warning: mt_srand() expects at most 2 parameters, 3 given in %s on line 2
NULL
Warning: mt_srand() expects parameter 1 to be integer, string given in %s on line 3
NULL
Notice: A non well formed numeric value encountered in %s on line 4
NULL