Em Qui, 2008-11-06 às 10:10 -0800, Stanislav Malyshev escreveu: > Hi! > > > So as suggested and wished, here is a patch that add a modifier '%' to > > 'a' in parameter parsing API, where it allows object that implements > > ArrayAccess to be accept. Although it doesn't invoke any their methods, > > i.e. just how it works nowdays. > > I think if you use HASH_OF then any object having get_properties should > be fine... Is there any reason to restrict it to ArrayAccess?
Well, there is no reason, I was only following what was said. It would make more sense in case of real BC break avoiding. > > A list of functions that allow object on current 5.2: > > . uksort > > . uasort > > . usort > > . natcasesort > > . natsort > > Interestingly, this list includes no sort(). Is it intentional? Also, we > have a bunch of array functions - wouldn't it make sense that all of > them behaved the same way towards objects? Yep, this was really interesting, see: $x = new stdclass; $x->foo = 1; sort($x); Warning: sort() expects parameter 1 to be array, object given ... As other functions that I guess you must be remembered. :) And yes, I have checked each array function. -- Regards, Felipe Pena -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php