note 81052 added to function.headers-sent

From: Date: Tue, 12 Feb 2008 20:33:09 +0000
Subject: note 81052 added to function.headers-sent
Groups: php.notes 
Request: Send a blank email to php-notes+get-136074@lists.php.net to get a copy of this message
I used $file from headers_sent() to determine if output has started rather than if headers have started to be sent; because the output hasn't started in between headers. This was to determine how long the xml serializer was taking to render output in my project. <?php # if debugging then... DEBUG && register_shutdown_function( 'timer::comment' ); abstract class timer { # I would post the rest of the class, however it is too long. # Use some imagination ;D # # ... # public static function comment() { headers_sent( $file ); if ( $file ) print( '<!-- render time="' . timer::stop() . '" /-->' . LINEBREAK ); } } ?> ---- Server IP: 209.41.74.194 Probable Submitter: 71.110.79.93 ---- Manual Page -- http://www.php.net/manual/en/function.headers-sent.php Edit -- https://master.php.net/note/edit/81052 Del: integrated -- https://master.php.net/note/delete/81052/integrated Del: useless -- https://master.php.net/note/delete/81052/useless Del: bad code -- https://master.php.net/note/delete/81052/bad+code Del: spam -- https://master.php.net/note/delete/81052/spam Del: non-english -- https://master.php.net/note/delete/81052/non-english Del: in docs -- https://master.php.net/note/delete/81052/in+docs Del: other reasons-- https://master.php.net/note/delete/81052 Reject -- https://master.php.net/note/reject/81052 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136074) next »