1--TEST--
2Test array_key_last() function (variation)
3--FILE--
4<?php
5
6/* Various combinations of arrays to be used for the test */
7$array = array( 1,2,3,4,5,6,7,8,9 );
8
9echo"\n*** Checking for internal array pointer not being changed by array_key_last ***\n";
10
11echo "\nCurrent Element is : ";
12var_dump( current($array) );
13
14echo "\nNext Element is : ";
15var_dump( next($array) );
16
17echo "\nLast key is : ";
18var_dump( array_key_last($array) );
19
20echo "\nCurrent Element after array_key_last operation is: ";
21var_dump( current($array) );
22
23echo"\nDone";
24?>
25--EXPECT--
26*** Checking for internal array pointer not being changed by array_key_last ***
27
28Current Element is : int(1)
29
30Next Element is : int(2)
31
32Last key is : int(8)
33
34Current Element after array_key_last operation is: int(2)
35
36Done
37