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

1.1       misho       1: --TEST--
                      2: Test next() function : basic functionality 
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : mixed next(array $array_arg)
                      6:  * Description: Move array argument's internal pointer to the next element and return it 
                      7:  * Source code: ext/standard/array.c
                      8:  */
                      9: 
                     10: /*
                     11:  * Test basic functionality of next()
                     12:  */
                     13: 
                     14: echo "*** Testing next() : basic functionality ***\n";
                     15: 
                     16: $array = array('zero', 'one', 'two');
                     17: echo key($array) . " => " . current($array) . "\n";
                     18: var_dump(next($array));
                     19: 
                     20: echo key($array) . " => " . current($array) . "\n";
                     21: var_dump(next($array));
                     22: 
                     23: echo key($array) . " => " . current($array) . "\n";
                     24: var_dump(next($array));
                     25: ?>
                     26: ===DONE===
                     27: --EXPECTF--
                     28: *** Testing next() : basic functionality ***
                     29: 0 => zero
                     30: string(3) "one"
                     31: 1 => one
                     32: string(3) "two"
                     33: 2 => two
                     34: bool(false)
                     35: ===DONE===

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