Annotation of embedaddon/php/ext/standard/tests/array/max_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test return type and value for expected input max()
                      3: --FILE--
                      4: <?php
                      5: /* 
                      6:  * proto mixed max(mixed arg1 [, mixed arg2 [, mixed ...]])
                      7:  * Function is implemented in ext/standard/array.c
                      8: */ 
                      9: 
                     10: echo "\n*** Testing sequences of numbers ***\n";
                     11: 
                     12: var_dump(max(2,1,2));
                     13: var_dump(max(-2,1,2));
                     14: var_dump(max(2.1,2.11,2.09));
                     15: var_dump(max("", "t", "b"));
                     16: var_dump(max(false, true, false));
                     17: var_dump(max(true, false, true));
                     18: var_dump(max(1, true, false, true));
                     19: var_dump(max(0, true, false, true));
                     20: var_dump(max(0, 1, array(2,3)));
                     21: 
                     22: echo "\nDone\n";
                     23: ?>
                     24: --EXPECT--
                     25: 
                     26: *** Testing sequences of numbers ***
                     27: int(2)
                     28: int(2)
                     29: float(2.11)
                     30: string(1) "t"
                     31: bool(true)
                     32: bool(true)
                     33: int(1)
                     34: bool(true)
                     35: array(2) {
                     36:   [0]=>
                     37:   int(2)
                     38:   [1]=>
                     39:   int(3)
                     40: }
                     41: 
                     42: Done

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