|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #46692 include function outputs unwanted 3 byte chars (п�ї)
Submitted: 2008-11-26 20:53 UTC Modified: 2008-11-27 21:56 UTC
From: aleks dot sys at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: * OS: *
Private report: No CVE-ID: None
 [2008-11-26 20:53 UTC] aleks dot sys at gmail dot com
When you use include, require etc functions for including any file even if it contain only <?php?> or <??> or even if it empty it will output some doesn't seen to the eye (in the browser) special chars "&#1087;?&#1111;" 3 bytes (EF BB BF).
It happend when the included file is in UTF-8 encode.

I've found possibly only one solution at least in this stage, is to save the file as "UTF8 without BOM" or ANSI. But don't UTF-8!

After I spent a lot of time to realize it and only when I find the solution to this problem i found another report for this bug: from 2003

So it should be or fixed or at least be in the documentation!

Reproduce code:


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-27 00:19 UTC] crrodriguez at opensuse dot org
what you see, is the expected behaviuor.
 [2008-11-27 08:14 UTC] aleks dot sys at gmail dot com
Expected? In which manual it is written?
I waste a whole day to understand why my table is one line below the "expected".
 [2008-11-27 15:52 UTC]
Your editor is saving your code with the BOM attached.

I have the same issue with EditPadPro.

PHP is not at fault in outputting the BOM.

 [2008-11-27 21:56 UTC] aleks dot sys at gmail dot com
Probably you'r right and PHP really can't avoid this "bug", but my point is that at least it should be well documented in the PHP documentation in the include topic!!
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jul 29 11:01:23 2021 UTC