Return to current_basic.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / array |
1.1 misho 1: --TEST-- 2: Test current() function : basic functionality 3: --FILE-- 4: <?php 5: /* Prototype : mixed current(array $array_arg) 6: * Description: Return the element currently pointed to by the internal array pointer 7: * Source code: ext/standard/array.c 8: */ 9: 10: /* 11: * Test basic functionality of current() 12: */ 13: 14: echo "*** Testing current() : basic functionality ***\n"; 15: 16: $array = array ('zero', 'one', 'two', 'three' => 3); 17: var_dump(current($array)); 18: next($array); 19: var_dump(current($array)); 20: end($array); 21: var_dump(current($array)); 22: next($array); 23: var_dump(current($array)); 24: ?> 25: ===DONE=== 26: --EXPECTF-- 27: *** Testing current() : basic functionality *** 28: string(4) "zero" 29: string(3) "one" 30: int(3) 31: bool(false) 32: ===DONE===