- The BOM is useless in UTF-8.
- It's neither. PHP is working as intended. Your file consists of this, and PHP is working as intended, because it outputs all data before the opening
<?php
tag first:
--
<byte order mark><?php // code here
--
- Don't use BOM.