Unicode variable names: Difference between revisions
Content deleted Content added
→{{header|C}}: link |
No edit summary |
||
Line 142: | Line 142: | ||
: Δ |
: Δ |
||
-> 2</lang> |
-> 2</lang> |
||
=={{header|PHP}}== |
|||
PHP is not made to support Unicode. UTF-16 (UCS-2) will not work because it adds null bytes before or after ASCII characters (depending on endianness of UTF-16). As every code has to start with <code><?php</code> (ASCII) exactly, the parser doesn't find the match and just prints <code><?php</code> mark. |
|||
UTF-8 uses ASCII values for bytes which can be represented as ASCII and as result it's possible to insert <code><?php</code> mark at beginning. PHP sees your document as some 8-bit encoding (like ISO-8859-1), but it doesn't matter because UTF-8 doesn't use ASCII ranges for its values and calls to the variable are consistent. |
|||
<lang php><?php |
|||
$Δ = 1; |
|||
++$Δ; |
|||
echo $Δ;</lang> |
|||
=={{header|Protium}}== |
=={{header|Protium}}== |