On Fri, Nov 18, 2011 at 5:37 PM, Felipe Pena <felipe...@gmail.com> wrote:
> 2011/11/18 Etienne Kneuss <col...@php.net>:
>> To me, it feels similar to the Array->String conversion:
>> It is one of those implicit conversions that is almost always indicating a 
>> bug.
>>
>> Therefore I would rather have both throw warnings than none of them.
>>
>> So -1 from me for the proposed unification.
>>
>
> Same opinion here. I do prefer not having such implict data repair.
Thanks for your answers

This is not about whether or not PHP's current behavior towards float
keys is good or not - it is *existing* behavior. This is about making
isset($array[$key]) and array_key_exists($key, $array) behave the same
(apart from the null value difference).

We could obviously make the unification work the other way around,
i.e. remove float, bool, resource and null support for array keys, but
I am sure that this will only be a call for the angry mob, which
expected that their 14.0 key behaves just like a 14 one (which kinda
makes sense in a PHP environment).

Nikita

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to