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.
Also cant we some how automate the BC break testing for this (aka scan all functions that accept an array with the old API in 5.2, pass it an ArrayObject instance and see what happens and compare that to 5.3)?
Yes we can ;) That should be not hard to do by looking at ones having 'a' in parameters in 5.3 and comparing how they react to arrays in 5.2 and in 5.3. Some of them, btw, might accept objects even though it doesn't make much sense - as above.
-- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php