From 1747b91508b1a5d833c7baecb6e20395dfdcc3b8 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Mon, 17 Jun 2002 23:48:37 +0000 Subject: [PATCH] added documentation for the renumber 'feature' of array_shift and unshift (bug #14791) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@85986 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-shift.xml | 7 ++++--- reference/array/functions/array-unshift.xml | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/reference/array/functions/array-shift.xml b/reference/array/functions/array-shift.xml index 97dd894397..34baa6c344 100644 --- a/reference/array/functions/array-shift.xml +++ b/reference/array/functions/array-shift.xml @@ -1,5 +1,5 @@ - + @@ -18,8 +18,9 @@ array_shift shifts the first value of the array off and returns it, shortening the array by one element and moving everything - down. If array is empty (or is not an - array), &null; will be returned. + down. All numerical array keys will be modified to start counting from zero + while literal keys won't be touched. If array is empty + (or is not an array), &null; will be returned. diff --git a/reference/array/functions/array-unshift.xml b/reference/array/functions/array-unshift.xml index 4f10a491f6..c154fc1b8b 100644 --- a/reference/array/functions/array-unshift.xml +++ b/reference/array/functions/array-unshift.xml @@ -1,5 +1,5 @@ - + @@ -22,7 +22,8 @@ array_unshift prepends passed elements to the front of the array. Note that the list of elements is prepended as a whole, so that the prepended - elements stay in the same order. + elements stay in the same order. All numerical array keys will be + modified to start counting from zero while literal keys won't be touched. Returns the new number of elements in the