blob: fc28b7c3429b2c8a0f72eb90b36e723f90132c6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--TEST--
Test current() function : basic functionality
--FILE--
<?php
/* Prototype : mixed current(array $array_arg)
* Description: Return the element currently pointed to by the internal array pointer
* Source code: ext/standard/array.c
*/
/*
* Test basic functionality of current()
*/
echo "*** Testing current() : basic functionality ***\n";
$array = array ('zero', 'one', 'two', 'three' => 3);
var_dump(current($array));
next($array);
var_dump(current($array));
end($array);
var_dump(current($array));
next($array);
var_dump(current($array));
?>
--EXPECT--
*** Testing current() : basic functionality ***
string(4) "zero"
string(3) "one"
int(3)
bool(false)
|