Re: [RFC] UString
| From: | Philip Hofstetter | Date: | Tue, 21 Oct 2014 09:19:54 +0000 |
| Subject: | Re: [RFC] UString | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78186@lists.php.net to get a copy of this message | ||
Hello
Tangentially related:
On Tuesday, October 21, 2014, Dmitry Stogov <dmitry@zend.com> wrote:
>
>
> It won't allow Unicode strings as array keys;
I wish there was a way for specific objects to opt into this.
Using __toString() we have something that mostly behaves just like a
string and can be used wherever a string is required - with the exception
of array keys.
I seem to remember some earlier discussion that led to this being
intentionally made impossible (and I understand why), but maybe there could
be support for another magic underscore method that's called when an object
is about to be put into an array as a key (or similar situations)
Philip
--
Sensational AG
Giesshübelstrasse 62c, Postfach 1966, 8021 Zürich
Tel. +41 43 544 09 60, Mobile +41 79 341 01 99
info@sensational.ch, http://www.sensational.ch