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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to