1--TEST--
2Test next() function : usage variation - Mulit-dimensional arrays
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 next() when passed:
12 * 1. a two-dimensional array
13 * 2. a sub-array
14 * as $array_arg argument.
15 */
16
17echo "*** Testing next() : usage variations ***\n";
18
19$array_arg = array ('a' => 'z', array(9, 8, 7));
20
21echo "\n-- Pass a two-dimensional array as \$array_arg --\n";
22var_dump(next($array_arg));
23var_dump(next($array_arg));
24
25echo "\n-- Pass a sub-array as \$array_arg --\n";
26var_dump(next($array_arg[0]));
27?>
28===DONE===
29--EXPECTF--
30*** Testing next() : usage variations ***
31
32-- Pass a two-dimensional array as $array_arg --
33array(3) {
34  [0]=>
35  int(9)
36  [1]=>
37  int(8)
38  [2]=>
39  int(7)
40}
41bool(false)
42
43-- Pass a sub-array as $array_arg --
44int(8)
45===DONE===
46