File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
math /
srand_basic.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--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===
--EXPECTF--
*** Testing srand() : basic functionality ***
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>