1--TEST--
2Test srand() function :  error conditions - incorrect number of args
3--FILE--
4<?php
5/* Prototype  : void srand  ([ int $seed  ] )
6 * Description: Seed the random number generator.
7 * Source code: ext/standard/rand.c
8 */
9
10/*
11 * Pass incorrect number of arguments to srand() to test behaviour
12 */
13
14echo "*** Testing srand() : error conditions ***\n";
15
16var_dump(srand(500, true));
17var_dump(srand("fivehundred"));
18var_dump(srand("500ABC"));
19?>
20===Done===
21--EXPECTF--
22*** Testing srand() : error conditions ***
23
24Warning: srand() expects at most 1 parameter, 2 given in %s on line %d
25NULL
26
27Warning: srand() expects parameter 1 to be long, string given in %s on line %d
28NULL
29
30Notice: A non well formed numeric value encountered in %s on line %d
31NULL
32===Done===
33