[PHP] PHP implementation of associative arrays

2001-07-10 Thread Kevin Bullaughey

is it possible to delete an item from an associative array by using
unset(thearray["item1"]); ?
if the array item is in turn a large object, does this free up the memory
that the object was taking up?
thanks,
-kevin bullaughey


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] strange register_shutdown_function() and fopen() conflict

2001-09-07 Thread Kevin Bullaughey

scenario...

i am trying to open a file from i function that is called automatically 
because it is registered with register_shutdown_function().

for some reason i am unable to call fopen(). i am assuming that my script 
causes a fatal error and i cannot see the output because with apache, one is 
not able to output at this stage. 

i'm running redhat linux roswell (7.2 beta), apache 1.3.19

for the code that appears below, if i comment out the line:
  $testfp = fopen("test.txt", "w+");

then i get the following output.txt file:
  opened output.txt successfully
  entered test_shutdown_function()
  failed to open test.txt
  end test_shutdown_function()

if i don't comment out the line, then i get only this:
 opened output.txt successfully
 entered test_shutdown_function()

any suggestions? my script must be terminating and i'm wondering why?
i have tried to eliminate the possibility that fopen is failing for ordinary 
i/o or permissions reasons.

any ideas? or maybe just a hint as to how to debug this?

here is the code



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]