Re: Object Destruction in PHP5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arjun Jain wrote:
Hi everyone,

When is the object destroyed which is created in a PHP5 script?

Suppose i say:

<?php
$m = new MyClass;
$m->fun1('abcd');
$m->fun2();

unset($m); // this fires $m->__destruct() if it exists.

?>

Then why is the destructor not called when my script ends? Can it be

it is called - but it won't output anything because by the time its called there is nothing for php to output to (think of a shutdown procedure) need to know more, search the list - it was covered in more depth within the last 7 days.

called explicitly? If yes, how?

Thanking you in advance,
Regards
aj
--
-----------------------------------------------------------------
Arjun Jain, 7th Sem CSE, RVCE
http://arjun.notlong.com
Visit http://groups.yahoo.com/group/rvcelug/ <http://groups.yahoo.com/group/rvcelug/>
-----------------------------------------------------------------



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux