|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-22 00:19 UTC] helly@php.net
[2005-03-22 01:04 UTC] webmaster at benliles dot com
[2005-03-22 09:13 UTC] derick@php.net
[2005-03-23 11:34 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 11:00:01 2025 UTC |
Description: ------------ It appears that PHP has a flag set for headers already being sent when __destruct() is called despite the fact that nothing is being sent before that. This has been seen in PHP 5.0.2 and PHP 5.0.3 with two different operating systems. This is not documented as claimed in an earlier bug report. Reproduce code: --------------- <? class letsTestThis { public function __destruct() { if (!headers_sent($file,$line)) { header("Content-type: text/xml"); echo "Some cool XML!"; } else { echo "Headers already sent in file: ".$file."<BR>\nOn Line: ".$line."<BR>\n"; } } } $test = new letsTestThis(); ?> Expected result: ---------------- Some cool XML Actual result: -------------- Headers already sent in file: On Line: 0