Strange characters in PHP

encoding, php

Solution

That's the BOM (Byte Order Mark) you are seeing.

In your editor, there should be a way to force saving without BOM which will remove the problem.

Problem

This is driving me crazy. I have this one php file on a test server at work which does not work.. I kept deleting stuff from it till it became ``` <? print 'Hello'; ?> ``` it outputs Hello if I create a new file and copy / paste the same script to it it works! Why does this one file give me the strange characters all the time?

Original source