Why does this file generate an invisible character?

image

image
image

Since it is invisible (you say it is) we cannot see it.

I am not experienced at PHP but you are probably getting the intended results. Why do you say there is an invisible character?

In the output you show I see a 404 because the favicon icon is not found. That is normal, there is no problem there. The next line has 123 and that is what is expected, correct?

I outputted ‘123’, but when I selected the entire return value in the command line, it displayed a red dot followed by ‘123’. I asked GPT, and it mentioned it’s an invisible character. It’s causing issues during my development. I’m receiving the characters ‘test123,’ but I’m getting ‘test123’ with an invisible character. It’s not visible when directly outputted but becomes visible when pasted into VSCode or a command line. 123. I’m not worrying about the icon error at the moment; this is a test file.

The character is probably a BOM (Byte Order Mark) character. You need to configure your programming editor to save UTF-8 encoded files without the BOM character.

Oh, thank you so much! This issue has been quite perplexing, I didn’t expect it to be related to this aspect

There is a VSCode extension called Hex Editor.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.