Return to bug21998.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / array |
1.1 misho 1: --TEST-- 2: Bug #21998 (array_pop() does not reset the current array position) 3: --FILE-- 4: <?php 5: 6: $a = array("a", "b", "c"); 7: 8: var_dump(key($a)); 9: var_dump(array_pop($a)); 10: var_dump(key($a)); 11: var_dump(array_pop($a)); 12: var_dump(key($a)); 13: var_dump(array_pop($a)); 14: var_dump(key($a)); 15: 16: ?> 17: --EXPECT-- 18: int(0) 19: string(1) "c" 20: int(0) 21: string(1) "b" 22: int(0) 23: string(1) "a" 24: NULL