1--TEST--
2Test current() function : usage variations - reference & normal parameters
3--FILE--
4<?php
5echo "*** Testing current() : usage variations ***\n";
6
7echo "\n-- Function: reference parameter --\n";
8
9function current_variation5_ref(&$a)
10{
11    var_dump(current($a));
12    var_dump(next($a));
13}
14
15$a = array('yes', 'maybe', 'no');
16
17var_dump(current($a));
18var_dump(next($a));
19current_variation5($a);
20
21echo "\n-- Function: normal parameter --\n";
22
23function current_variation5($a)
24{
25    var_dump(current($a));
26    var_dump(next($a));
27}
28
29$a = array('yes', 'maybe', 'no');
30
31var_dump(current($a));
32var_dump(next($a));
33current_variation5($a);
34
35?>
36--EXPECT--
37*** Testing current() : usage variations ***
38
39-- Function: reference parameter --
40string(3) "yes"
41string(5) "maybe"
42string(5) "maybe"
43string(2) "no"
44
45-- Function: normal parameter --
46string(3) "yes"
47string(5) "maybe"
48string(5) "maybe"
49string(2) "no"
50