Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41735 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20570 invoked from network); 6 Nov 2008 18:29:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2008 18:29:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.46.30 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 74.125.46.30 yw-out-2324.google.com Received: from [74.125.46.30] ([74.125.46.30:24304] helo=yw-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/00-44653-18733194 for ; Thu, 06 Nov 2008 13:29:22 -0500 Received: by yw-out-2324.google.com with SMTP id 5so305709ywb.83 for ; Thu, 06 Nov 2008 10:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=+Z2dV4CNCbAfu1v0rtZ9Xcd1oW/I+cvU5+CwrZx3Z68=; b=DBb/DLFfJUQgrEWJq7DKTFgiXN73Kr5JVNGlhJYCbjHKt1y7Yt84T4Kk3RnjXq81tq U/hvGg9ZQDJ5BZ43QmDpF9og5MsKtk5+qXPGbivNkN/+22m6v2EMFZNzdCzDUGMerG+K Eb9Li6NmVU2BYFOX8LBobn2c+BR4T/WuXL+Lk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=kfcL1jugA5TgT3/AE56rkx+jOUKugp4O6t4Avce2JEHnVLmnTN4L6cw5i8iyn5mJx0 vSVYH6sE2fEk+OWzJYJdZ3Fzw6lyhCzG6H123eXS6325Qb0uUUJx+0TXN101qd43+0b2 4sH6SiwKadTl3xU/2/pjDMlUyu/kGk4tyMdBM= Received: by 10.90.89.14 with SMTP id m14mr2093207agb.60.1225996158899; Thu, 06 Nov 2008 10:29:18 -0800 (PST) Received: from ?10.0.18.8? (venus.fioprev.org.br [157.86.206.62]) by mx.google.com with ESMTPS id 20sm1968111agb.38.2008.11.06.10.29.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 Nov 2008 10:29:18 -0800 (PST) To: Stanislav Malyshev Cc: Geoffrey Sneddon , Lukas Kahwe Smith , PHP Internals In-Reply-To: <49133302.4040701@zend.com> 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> <49133302.4040701@zend.com> Content-Type: text/plain; charset=utf-8 Date: Thu, 06 Nov 2008 16:29:13 -0200 Message-ID: <1225996153.5465.30.camel@felipe> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] array_key_exists BC break From: felipensp@gmail.com (Felipe Pena) Em Qui, 2008-11-06 às 10:10 -0800, Stanislav Malyshev escreveu: > 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? Well, there is no reason, I was only following what was said. It would make more sense in case of real BC break avoiding. > > 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? Yep, this was really interesting, see: $x = new stdclass; $x->foo = 1; sort($x); Warning: sort() expects parameter 1 to be array, object given ... As other functions that I guess you must be remembered. :) And yes, I have checked each array function. -- Regards, Felipe Pena