1--TEST-- 2Test array_push() function : usage variations - position of internal array pointer 3--FILE-- 4<?php 5/* Prototype : int array_push(array $stack, mixed $var [, mixed $...]) 6 * Description: Pushes elements onto the end of the array 7 * Source code: ext/standard/array.c 8 */ 9 10/* 11 * Check the position of the internal array pointer after calling array_push() 12 */ 13 14echo "*** Testing array_push() : usage variations ***\n"; 15 16$stack = array ('one' => 'un', 'two' => 'deux'); 17$var0 = 'zero'; 18 19echo "\n-- Call array_push() --\n"; 20var_dump($result = array_push($stack, $var0)); 21 22echo "\n-- Position of Internal Pointer in Original Array: --\n"; 23echo key($stack) . " => " . current ($stack) . "\n"; 24 25echo "Done"; 26?> 27--EXPECTF-- 28*** Testing array_push() : usage variations *** 29 30-- Call array_push() -- 31int(3) 32 33-- Position of Internal Pointer in Original Array: -- 34one => un 35Done 36