#29551 [Opn->Csd]: ob_start() and __destruct() method

From: Date: Fri, 06 Aug 2004 18:32:23 +0000
Subject: #29551 [Opn->Csd]: ob_start() and __destruct() method
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-64201@lists.php.net to get a copy of this message
ID: 29551 Updated by: helly@php.net Reported By: j_amel83 at yahoo dot com -Status: Open +Status: Closed Bug Type: Output Control Operating System: Windows XP 2002 PHP Version: 5.0.0 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2004-08-06 17:40:10] j_amel83 at yahoo dot com Description: ------------ I found that if there is an ob_start() function which is calledback with it optional 'output_callback' argument in a PHP5 page non of Destructor method in exists objects can send any output to the standard output. Reproduce code: --------------- <?php ob_start('ob_gzhandler'); class Test { function __construct() { echo 'Constructed <br />'; } function __destruct() { echo 'Destructed <br />'; } } $test = new Test(); ?> Expected result: ---------------- Constructed <br />Destructed <br /> Actual result: -------------- Constructed <br /> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29551&edit=1

« previous php.bugs (#64201) next »