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