2008/11/15 Lukas Kahwe Smith <[EMAIL PROTECTED]>:
>
> On 13.11.2008, at 19:19, Stanislav Malyshev wrote:
>
>> Hi!
>>
>>> Can anyone write up a summary of the situation and the options we have?
>>
>> Sure. A number of array functions in 5.2 accept arrays, but use HASH_OF to
>> extract array value, which means they automatically accept objects if the
>> object has working get_properties handler. In 5.3, such function use new API
>> with 'a' parameter, which accepts only arrays proper.
>> The proposal is to have some new parameter - say 'a%' - which would call
>> HASH_OF on objects where it makes sense. The definition of "makes sense" is
>> not clear yet, since, for example, sort() on some objects may make sense -
>> if the object's get_properties returns real storage - or may not, if that
>> handler returns the mere copy of the real data. We might use some interface
>> as a marker - like ArrayAccess - though I'm not sure if it will work in all
>> circumstances.
>
> So what if we for now stick with the BC fix?
> However maybe for PHP 6.0 we should make a real effort to figure out how
> objects are supposed to be handled in our PHP type juggeling world.
>

I think we should fix it, if theres BC its most likely people will
draw away from using it, especially people writing cross version
applications if they have to "hack" their way to use this feature. I
like Stas' suggestion for changing the parameter parsing api to
support it like that.



-- 
Kalle Sommer Nielsen

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

Reply via email to