summaryrefslogtreecommitdiff
path: root/ext/standard/tests/math/srand_basic.phpt
blob: a3788cdf45329cce07d69400bc74f10b15b0a744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Test srand() - basic function test for srand()
--FILE--
<?php
/* Prototype  : void srand  ([ int $seed  ] )
 * Description: Seed the random number generator.
 * Source code: ext/standard/rand.c
 */

echo "*** Testing srand() : basic functionality ***\n";

// 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(srand());
var_dump(srand(500));
var_dump(srand(500.1));
var_dump(srand("500"));
var_dump(srand("500E3"));
var_dump(srand(true));
var_dump(srand(false));
var_dump(srand(NULL));
?>
===Done===
--EXPECT--
*** Testing srand() : basic functionality ***
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
===Done===