|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-06-24 18:44 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Operating System: Linux
+Operating System: *
-PHP Version: 5.3.8
+PHP Version: 5.6.10
[2015-06-24 18:44 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 03:00:01 2025 UTC |
Description: ------------ SAPIs that do not support HTTP header(s), give warnings that output has been already sent like "Warning: Cannot modify header information - headers already sent by..." even those APIs do *not* support headers. There is no use to warn about something that can never happen; There is nothing to modify; There are no headers that already have been sent. It might make more sense to warn that this function is useless w/o HTTP response headers being available. Compare with headers_sent(), it does differ between SAPIs. Would be nice to have this a bit more streamlined. Additionally header() could return FALSE if it failed like setcookie(). Test script: --------------- In CLI: <?php echo "output"; session_start(); setcookie("TestCookie", 'value'); header('X-TestHeader: value'); ?>