Annotation of embedaddon/php/ext/standard/tests/math/srand_basic.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test srand() - basic function test for srand()
        !             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: echo "*** Testing srand() : basic functionality ***\n";
        !            11: 
        !            12: // Should return NULL if given anything that it can convert to long
        !            13: // This doesn't actually test what it does with the input :-\
        !            14: var_dump(srand());
        !            15: var_dump(srand(500));
        !            16: var_dump(srand(500.1));
        !            17: var_dump(srand("500"));
        !            18: var_dump(srand("500E3"));
        !            19: var_dump(srand(true));
        !            20: var_dump(srand(false));
        !            21: var_dump(srand(NULL));
        !            22: ?>
        !            23: ===Done===
        !            24: --EXPECTF--
        !            25: *** Testing srand() : basic functionality ***
        !            26: NULL
        !            27: NULL
        !            28: NULL
        !            29: NULL
        !            30: NULL
        !            31: NULL
        !            32: NULL
        !            33: NULL
        !            34: ===Done===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>