Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41928 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10519 invoked from network); 15 Nov 2008 18:35:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2008 18:35:57 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:40720] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/12-32680-C861F194 for ; Sat, 15 Nov 2008 13:35:57 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 0F3DE4144058; Sat, 15 Nov 2008 18:37:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MggzbH4QE8ie; Sat, 15 Nov 2008 19:37:39 +0100 (CET) Received: from [192.168.0.151] (77-58-151-147.dclient.hispeed.ch [77.58.151.147]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 73783414400F; Sat, 15 Nov 2008 19:37:39 +0100 (CET) Cc: Felipe Pena , Geoffrey Sneddon , PHP Internals Message-ID: <4A1C7FFD-F85F-4D61-BEDA-7C0D31485C35@pooteeweet.org> To: Stanislav Malyshev In-Reply-To: <491C6FAF.104@zend.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Sat, 15 Nov 2008 19:34:26 +0100 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> <491C6FAF.104@zend.com> X-Mailer: Apple Mail (2.929.2) Subject: Re: [PHP-DEV] array_key_exists BC break From: mls@pooteeweet.org (Lukas Kahwe Smith) On 13.11.2008, at 19:19, Stanislav Malyshev wrote: > 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. So what if we for now stick with the BC fix? However maybe for PHP 6.0 we should make a real effort to figure out how objects are supposed to be handled in our PHP type juggeling world. regards, Lukas Kahwe Smith mls@pooteeweet.org