memory allocation in &$var...
| From: | Christian Dechery | Date: | Tue, 27 Mar 2001 00:30:52 +0000 |
| Subject: | memory allocation in &$var... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-45672@lists.php.net to get a copy of this message | ||
By doing this:
<?php
$someArray=array("this","that","those");
for(something to loop)
do something with $someArray here;
?>
is PHP using the same amount of memory as this:
<?php
$someArray=array("this","that","those");
somefunction($someArray);
function somefunction(&$ref_to_array)
{
for(something to loop)
do something with $ref_to_array here;
}
?>
because it seems to me, that the script gets a little slower when I introduce the function method.
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer