RE: [PHP-CVS] cvs: php-src /ext/date php_date.c /ext/dom node.c /ext/filter logical_filters.c /ext/session session.c /ext/simplexml simplexml.c
/ext/soap php_encoding.c php_packet_soap.c soap.c /ext/sqlite sqlite.c /ext/standard ba
| From: | Derick Rethans | Date: | Tue, 19 Sep 2006 20:59:24 +0000 |
| Subject: | RE: [PHP-CVS] cvs: php-src /ext/date php_date.c /ext/dom node.c /ext/filter logical_filters.c /ext/session session.c /ext/simplexml simplexml.c /ext/soap php_encoding.c php_packet_soap.c soap.c /ext/sqlite sqlite.c /ext/standard ba |
||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-40611@lists.php.net to get a copy of this message | ||
On Tue, 19 Sep 2006, Dmitry Stogov wrote:
> As you remember, on PDM we deside to remove IS_BINARY data type and change
> symantic of IS_STRING to IS_BINARY in unicode mode.
> This patch is long delayed finalization of planned change.
> PHP array should be able to have unicode and binary keys, and binary values
> shouldn't be converted to unicode.
>
> $ php -d "unicode.semantics=1" -r
> 'var_dump(array(b"foo"=>b"foo",
> "bar"=>bar));'
>
> Removing this autoconversion makes programmer's life little bit more
> difficult. :(
Yes, I remember... but there is no reason why our internal keys should
be defined as binaries. The idea was that you *could* have binary
strings as keys to make the hash lookups quicker (as we'd only need to
store one hash for each key). I still think that all our extensions
should use strings (unicode) as key as that is most likely what people
will expect running in unicode mode. Atleast I would expect it, as it's
somewhat the same currently semantically.
regards,
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org