|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-10 09:38 UTC] derick@php.net
[2007-01-09 04:26 UTC] a at b dot c dot de
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 15:00:01 2025 UTC |
Description: ------------ In most (Windows) fonts, character 0xa0 renders as a blank (nonbreaking) space. Some people use text editors that for whatever reason like to use 0xa0 at random locations instead of ordinary spaces. The result is code that _looks_ correct, but when run can trigger a parse error for no apparent reason. In zend_language_scanner.l, 0xa0 is recognised as a LABEL character (which means, among other things, that you could have a variable called "$ ");. Assuming no-one is perverted enough to do something like that, it should be safe to reassign it to WHITESPACE (will this cause grief in other character sets?). Reproduce code: --------------- <?php //There is an 0xa0 character immediately following the // brace on the next line for($i=0; $i<5; $i++){ echo "Hello, World\n"; } ?> Expected result: ---------------- Hello, World Hello, World Hello, World Hello, World Hello, World Actual result: -------------- Parse error: parse error, unexpected T_ECHO in C:\test.php on line 5