diff --git a/language/variables.xml b/language/variables.xml index 710a69bf4224..95d21540ef85 100644 --- a/language/variables.xml +++ b/language/variables.xml @@ -23,10 +23,22 @@ - PHP doesn't support Unicode variable names, however, some character - encodings (such as UTF-8) encode characters in such a way that all bytes - of a multi-byte character fall within the allowed range, thus making it a - valid variable name. + Variable names are compared as bytes, not as characters. PHP does not + interpret or validate the encoding of the bytes from 128 through 255, and + two names refer to the same variable only when their bytes are identical. + + + One consequence is that names written in UTF-8 work, because every byte of + a UTF-8 multi-byte sequence falls inside the accepted range. The same holds + for any encoding whose non-ASCII bytes all fall in that range, and for byte + sequences that are not valid text in any encoding. Encodings that use bytes + below 128 within a multi-byte sequence, such as Shift-JIS or UTF-16, do not. + + + Another is that two names which display identically may be distinct. + รค encoded as U+00E4 and as a + followed by the combining diaeresis U+0308 are different variables, as are + a name with and without a trailing U+00A0 NO-BREAK SPACE.