I have a question:

In my PHP-script i have created a function with many calculation and
variables in the function.

function testfunc($var1,$var2)
...many calculation and variables
return $result;

When i call the function they will work correktly - no errors, no warnings.

Just when i call the function 15 times in serial

echo testfunc(100,200);
echo testfunc(100,200);
echo testfunc(100,200);
echo testfunc(100,200);

then on call number 12 the script exits whith error-message:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 257 bytes) in /home/www/linkdir/oslib.php on line 203

And now my question:
When i call a function and the function come to an end - is PHP not
giving free the allocated memorie for this funktion?

Must i giving free the memory at hand?

When i in the function before its end give all vars free with unset(); then
the error also comes
on the same place.

How can i find out on which place i must modify my code that the error not

Can i "unset()" a complete function on his end?

What can i do?

Greethings Oliver Gehring
(please sorry for my bad english)

Reply via email to