Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41929 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12439 invoked from network); 15 Nov 2008 18:48:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2008 18:48:13 -0000 Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.157 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 72.14.220.157 fg-out-1718.google.com Received: from [72.14.220.157] ([72.14.220.157:56774] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/72-32680-C691F194 for ; Sat, 15 Nov 2008 13:48:13 -0500 Received: by fg-out-1718.google.com with SMTP id 16so1618460fgg.23 for ; Sat, 15 Nov 2008 10:48:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=+ykgocFrCooSR2JKRygMHDrAIwhjfdqmum3GIKRiqic=; b=Oc7TBQnyk4ocgjolFWNaHV1VQvluIQhyfUVYl5SwJZIWjRvkrh7Yzy9jvESXvpsi3t DBuQPpxJC+CMf5YiplPvhd5IDy43Wq5fdYsjSC4jy388wuRn2qZtpnGGmcopcxkCRQPB f1S+39AtGlBwF5kiPpDmL1vnZAonP7VWcWLro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=qPqxN5FFmhobM1Si1HDtwA6i+Eh7ZogggcyYFoAcyOg9vdl0mCaVAw6NRGKT1DiRu2 nOhFeFR/DcCsE1W5XiOrN4prCM+biVk7D0ZT4ex48KsMSRdUAUjVjfj+kdK80uzoE2oc LLxEY5vGZ35qQ20sNMslea2cByuT1TRoi3XDE= Received: by 10.187.220.5 with SMTP id x5mr258951faq.78.1226774889667; Sat, 15 Nov 2008 10:48:09 -0800 (PST) Received: by 10.187.218.19 with HTTP; Sat, 15 Nov 2008 10:48:09 -0800 (PST) Message-ID: <2dedb8a0811151048pda86b4dje44ec5ceb1b7740a@mail.gmail.com> Date: Sat, 15 Nov 2008 19:48:09 +0100 To: "Lukas Kahwe Smith" Cc: "Stanislav Malyshev" , "Felipe Pena" , "Geoffrey Sneddon" , "PHP Internals" In-Reply-To: <4A1C7FFD-F85F-4D61-BEDA-7C0D31485C35@pooteeweet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4900DB81.4000805@zend.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> <4A1C7FFD-F85F-4D61-BEDA-7C0D31485C35@pooteeweet.org> Subject: Re: [PHP-DEV] array_key_exists BC break From: kalle.php@gmail.com ("Kalle Sommer Nielsen") 2008/11/15 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. > I think we should fix it, if theres BC its most likely people will draw away from using it, especially people writing cross version applications if they have to "hack" their way to use this feature. I like Stas' suggestion for changing the parameter parsing api to support it like that. -- Kalle Sommer Nielsen