Re: array_key_exists BC break

From: Date: Thu, 06 Nov 2008 18:10:10 +0000
Subject: Re: array_key_exists BC break
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-41733@lists.php.net to get a copy of this message
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?
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? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#41733) next »