Strange characters in PHP Strange characters in PHP php php

Strange characters in PHP


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.


Found it, file -> encoding -> UTF8 with BOM , changed to to UTF :-)

I should ahve asked before wasing time trying to figure it out :-)


Just in case, here is a list of bytes for BOM

Encoding    Representation (hexadecimal)UTF-8   EF BB BFUTF-16 (BE) FE FFUTF-16 (LE) FF FEUTF-32 (BE) 00 00 FE FFUTF-32 (LE) FF FE 00 00UTF-7   2B 2F 76, and one of the following bytes: [ 38 | 39 | 2B | 2F ]†UTF-1   F7 64 4CUTF-EBCDIC  DD 73 66 73SCSU    0E FE FFBOCU-1  FB EE 28 optionally followed by FF†