Re: Proposal for PHP 7 : case-sensitive symbols
| From: | Rowan Collins | Date: | Sun, 21 Dec 2014 12:55:38 +0000 |
| Subject: | Re: Proposal for PHP 7 : case-sensitive symbols | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79847@lists.php.net to get a copy of this message | ||
On 20 December 2014 22:44:24 GMT, Alain Williams <addw@phcomp.co.uk> wrote:
>Fixing this would require a lot of work as well as some way of
>determining what
>character encoding the source file was written in ... different
>includes might
>have different encodings.
>
>We recently talked about a way of specifying source file encoding and
>decided
>that it was not something to look at now (IIRC).
I haven't read the whole thread yet, so apologies if someone's mentioned this already, but
far from being a rejected feature, specifying source file encoding is already possible, using
declare(encoding=...)
The problem is what to do with that information: presumably, identifiers would need to be converted
to an internal encoding (prob utf8), case folded, and normalised (in the Unicode sense of that
term). Ideally, this would happen during compilation and stored appropriately in the OpCache, but a
run-time path for userland strings would also be necessary.