Re: array_key_exists BC break
| From: | Felipe Pena | Date: | Thu, 06 Nov 2008 12:10:06 +0000 |
| Subject: | Re: array_key_exists BC break | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41718@lists.php.net to get a copy of this message | ||
Hi all,
Em Qua, 2008-11-05 às 16:20 +0000, Geoffrey Sneddon escreveu:
> On 4 Nov 2008, at 22:59, Stanislav Malyshev wrote:
>
> >> so where do we stand here?
> >
> > I'd prefer to have it fixed, but then it probably requires changing
> > the parameters API for 'a', which might lead to some unexpected
> > results with regard to functions that modify their arguments. I
> > think we may leave it alone for this alpha but try to resolve it for
> > 5.3 release.
>
> If it isn't fixed it ought to be a documented as a BC break, seeming
> it does break real apps.
>
>
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.
A list of functions that allow object on current 5.2:
. end
. prev
. next
. reset
. current
. key
. array_key_exists
. array_unique
. array_flip
. array_walk_recursive
. array_walk
. uksort
. uasort
. usort
. natcasesort
. natsort
Hence, I added such modifier to this functions in the patch.
5.3: http://felipe.ath.cx/diff/arg_arrayaccess.diff
--
Regards,
Felipe Pena