Rommeo Posted December 26, 2010 Share Posted December 26, 2010 I have told that the php files I was working on contains BOM by default cause of the editor I m using. I have installed other editor that can create php files without BOM. So my question is what's the difference between 2 files, one with BOM and other without BOM ? Any problems I may face for long term usage ? Which one is better to use ? Quote Link to comment Share on other sites More sharing options...
dragon_sa Posted December 26, 2010 Share Posted December 26, 2010 see this reference http://bugs.php.net/bug.php?id=22108 discusses the effects of BOM Quote Link to comment Share on other sites More sharing options...
Rommeo Posted December 26, 2010 Author Share Posted December 26, 2010 it also says that by using recent versions of PHP there wont be any problem. Using files without BOM cause any effects for long term ? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted December 27, 2010 Share Posted December 27, 2010 Using files without BOM cause any effects for long term ? no. files without BOM will continue to be supported. Quote Link to comment Share on other sites More sharing options...
requinix Posted December 27, 2010 Share Posted December 27, 2010 - UTF-8 is backwards compatible with regular ASCII in the 0-127 character range. That includes everything on the keyboard (and more). If you don't use Unicode characters >127 directly in your file then there won't be any problems anywhere. IIRC most UTF-8 encoded characters use character codes that are valid in PHP (like for variable or function names) so even if you do want Unicode stuff, you can probably get away with it - even without the BOM. Worst case: you use "\x??" and HTML entities. - As the last comment says, and as I see on my PHP/Win 5.3.2, there is no multibyte support from the Zend engine. - There is no PHP 6 anymore. Don't wait for it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.