note 71365 added to function.array

From: Date: Fri, 24 Nov 2006 10:01:33 +0000
Subject: note 71365 added to function.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-120051@lists.php.net to get a copy of this message
Just a short message. There is a problem with array creating with references using function array(). Array is function as any other, so you cannot forse parameters to be passed by reference in call time! This manner is deprecated and you will go into troubles soon with you web provider's php.ini settings. DO NOT USE! $my_array = array(&$element_1, &$element_2); INSTEAD USE! $my_array[] =& $element_1; $my_array[] =& $element_2; This problem should be solved soon since you cannot use many array functions like array_push() etc. ---- Server IP: 212.24.129.110 Probable Submitter: 194.228.18.204 (proxied: 1.1 PRXPHA01, 1.1 Symantec_Web_Security (3.0.1.80)) ---- Manual Page -- http://www.php.net/manual/en/function.array.php Edit -- https://master.php.net/note/edit/71365 Del: integrated -- https://master.php.net/note/delete/71365/integrated Del: useless -- https://master.php.net/note/delete/71365/useless Del: bad code -- https://master.php.net/note/delete/71365/bad+code Del: spam -- https://master.php.net/note/delete/71365/spam Del: non-english -- https://master.php.net/note/delete/71365/non-english Del: in docs -- https://master.php.net/note/delete/71365/in+docs Del: other reasons-- https://master.php.net/note/delete/71365 Reject -- https://master.php.net/note/reject/71365 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120051) next »