From c0f9335700b4cdb359dc993f3379ac94247dc67b Mon Sep 17 00:00:00 2001 From: Sean Coates Date: Sat, 13 Aug 2005 19:06:21 +0000 Subject: [PATCH] explain behaviour when first argument is not an array (#34134) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@193331 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-push.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reference/array/functions/array-push.xml b/reference/array/functions/array-push.xml index 189e2d3b1b..afc68370b7 100644 --- a/reference/array/functions/array-push.xml +++ b/reference/array/functions/array-push.xml @@ -1,5 +1,5 @@ - + @@ -70,6 +70,13 @@ Array way there is no overhead of calling a function. + + + array_push will raise a warning if the first + argument is not an array. This differs from the + $var[] behaviour where a new array is created. + + See also array_pop, array_shift, and