Edit report at http://bugs.php.net/bug.php?id=52279&edit=1

 ID:               52279
 Updated by:       [email protected]
 Reported by:      nefthy-php dot net at nefthy dot de
 Summary:          non-breaking space not threated as white space
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          *Compile Issues
 Operating System: linux
 PHP Version:      5.3.2

 New Comment:

This is expected behaviour. To quote 

http://au2.php.net/manual/en/language.variables.basics.php:



Note: For our purposes here, a letter is a-z, A-Z, and the bytes from
127 

through 255 (0x7f-0xff).



Exactly what happens in your example will depend on the encoding of the
script, 

but if it's UTF-8, then the non-breaking space is represented as two
bytes (C2; 

A0), both of which are above 7F and therefore are valid within a
variable name.


Previous Comments:
------------------------------------------------------------------------
[2010-07-07 18:29:21] nefthy-php dot net at nefthy dot de

Description:
------------
The unicode character 00A0 (non breaking space) is not threated as
whitespace.

Test script:
---------------
$a_="foo"; 

echo $a;



substitute _ above with non-breaking space. Under X11 usualy windowkey
followed bei two spaces. The non breaking space actualy bekomes part of
the variable name.

Expected result:
----------------
foo

Actual result:
--------------
Notice: Undefined variable $a ..


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52279&edit=1

Reply via email to