Why would whitespace cause a fatal error in PHP?

99封情书 提交于 2019-12-06 02:28:38

What you have there is a UTF-8 encoded non-breaking space (%C2%A0, aka  ), which breaks PHP's parser. It's a known problem with PHP that is marked as "won't fix" because people "might use this character as part of an identifier." See Request #38766 Nonbreaking whitespace breaks parsing.

just banged my head for about an hour going totally insane about this.

Notepad++ doesn't show ANY difference between a regular space and a nbsp.

If you wonder how this character actually got into your code, this is how i got mine : altgr + space

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!