From ac27f241833b371310e65823d73f9db43c7a3ab9 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 12 Jan 2004 20:48:44 +0000 Subject: [PATCH] - Add tip about $array[] to array_push() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@148554 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 debf9c8f92..382392bf8f 100644 --- a/reference/array/functions/array-push.xml +++ b/reference/array/functions/array-push.xml @@ -1,5 +1,5 @@ - + @@ -63,6 +63,13 @@ Array + + + If you use array_push to add one element to the + array it's better to use $array[] = because in that + way there is no overhead of calling a function. + + See also array_pop, array_shift, and