note 71365 deleted from function.array by cataphract
| From: | cataphract@php.net | Date: | Fri, 22 Oct 2010 11:03:39 +0000 |
| Subject: | note 71365 deleted from function.array by cataphract | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-173370@lists.php.net to get a copy of this message | ||
Note Submitter: jonovic at seznam dot cz
----
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.