Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42000 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43341 invoked from network); 20 Nov 2008 23:52:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Nov 2008 23:52:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.116 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.116 us-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [63.205.162.116] ([63.205.162.116:17188] helo=us-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/15-06451-438F5294 for ; Thu, 20 Nov 2008 18:52:22 -0500 Received: from [192.168.16.110] ([192.168.16.110]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 20 Nov 2008 15:52:30 -0800 Message-ID: <4925F83E.2060609@zend.com> Date: Thu, 20 Nov 2008 15:52:30 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Felipe Pena CC: Dmitry Stogov , Lukas Kahwe Smith , PHP Internals References: <4900DB81.4000805@zend.com> <4900E150.1010607@dynom.nl> <49018FC3.90302@gmail.com> <1224854888.19390.89.camel@goldfinger.johannes.nop> <490609A1.7090400@gravitonic.com> <1225199800.878.0.camel@localhost> <3F3445975B55414BB4A214B32E178657@pc> <4A4FE9BC-F000-4AEE-A68C-8EFEA9DCD154@pooteeweet.org> <4910D3E5.4020406@zend.com> <237D5067-10C6-4D25-8CCF-FEF9FE44F6F6@googlemail.com> <1225973406.5465.18.camel@felipe> In-Reply-To: <1225973406.5465.18.camel@felipe> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Nov 2008 23:52:30.0977 (UTC) FILETIME=[0D140710:01C94B6B] Subject: Re: [PHP-DEV] array_key_exists BC break From: stas@zend.com (Stanislav Malyshev) Hi! > . end > . prev > . next > . reset > . current > . key I think those should be more friendly with Iterators, but for other objects probably not much sense to allow it. In 5.2 they modify or use current hash pointer, but for objects that doesn't make too much sense. > . array_key_exists Here it may make some sense, though I guess it should maybe go through more specific handlers (i.e. has_dimension or has_property?). Also, feels weird that key_exists works but in_array doesn't. > . array_unique > . array_flip > . array_walk_recursive > . array_walk Those are ok with any object, in theory, though it's not clear why you could do array_flip on object but not array_reverse or array_keys/values. Maybe we should not have object support from those, except array_walk_* for Iterators? If you want something else, get properties manually... > . uksort > . uasort > . usort > . natcasesort > . natsort These frankly make little sense with objects and also other sorts do not support object, so I'd say this is just a bug that they allow objects at all. Any comments? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com