ID:               29372
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mark at seventhcycle dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: Fedora Core 2
 PHP Version:      5.0.0
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You cannot use print, echo and friends in destructors because they are
executed after the output facility has been shutdown. Use unset($obj)
at the end of your script to force termination prior to starting
shutdown process.


Previous Comments:
------------------------------------------------------------------------

[2004-07-25 07:55:31] mark at seventhcycle dot net

Description:
------------
The destructor for any classes I make isn't being called.  Here is a
diff of my php.ini to the distributed one.

/usr/local/lib#> diff php.ini php.ini-dist 
120c120
< zlib.output_compression = On
---
> zlib.output_compression = Off
293c293
< log_errors = On
---
> log_errors = Off
340c340
< error_log = syslog
---
> ;error_log = syslog
373c373
< register_globals = On
---
> register_globals = Off
952c952
< session.use_trans_sid = 1
---
> session.use_trans_sid = 0


The reproduced code run below is live here:
http://seventhcycle.net/php/classtest.php

A copy of my phpinfo can be found here:
http://seventhcycle.net/php/phpinfo.php

Reproduce code:
---------------
<?php
class MyDestructableClass {
   function __construct() {
       print "construct\n";
   }

   function __destruct() {
       print "destruct";
   }
}

$obj = new MyDestructableClass();
?> 

Expected result:
----------------
construct
destruct

Actual result:
--------------
construct


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29372&edit=1

Reply via email to