|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-03-25 21:01 UTC] furun at arcor dot de
Description: ------------ PHP send the BOM (before the tag "<?php") to the output. This is a source for some very strange buggy behavior, which are sometimes very difficult to find, because a developer searches errors first in the code it self and not in a mostly invisible BOM. (I searched a "bug" in a image creating script for long time, before i found the BOM-Bug in a third party plugin far away from the "buggy code". The common "Headers already sent" error caused by the BOM are still confusing, but easier to find then a corrupted binary file.) I would suggest that PHP filters every BOM from PHP output. (Or is there any reason not to do so i not know of?) Test script: --------------- (Use any file with BOM) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 00:00:01 2025 UTC |
I was going to say exactly opinion of @"ean-marc at paratte dot ch"; Adding s simple setting to include / require / etc... And also adding a general setting for change the default of that. Like: Include("file.php",true); // If the command can be function or Include "file.php,1"; or Include "file.php /clean"; And in our wishes it remove any kind of header/BOM of files Best regards :)