Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73317 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48073 invoked from network); 20 Mar 2014 02:36:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2014 02:36:51 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.177 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.128.177 mail-ve0-f177.google.com Received: from [209.85.128.177] ([209.85.128.177:47422] helo=mail-ve0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/F2-33112-2445A235 for ; Wed, 19 Mar 2014 21:36:50 -0500 Received: by mail-ve0-f177.google.com with SMTP id sa20so225355veb.22 for ; Wed, 19 Mar 2014 19:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mYATdCGJMffbr6O+4Y03kT7sTbJdDkDP9gd+k4qG3Rw=; b=ImMf5BqDJV0slF2KBPyTn30gZvNKkStGivYw6dku8D1S0t1AWaaxA4E99/OMTA79wI X4/JeJvbOCs4dCIjKayRdsjMPgUp88Qsy3gOYCiI0kw4HUEtUJJhmXJVGcx+r5NwH9pN w+RQ4q3Z0owN6/HpsCTlHTxxuQOjcgMczxhwD9ckbuf0uyTm2QInq/IibYfbd6VVDYCK G+lmYn2BfdaVIrsuj4gT/uoBYHukoNVw0AG+pUaznlHRNg4uu1zskWdNK8iC85z61tGo 5CLMOSHRvBdHZB+QiZvyAoRE1XzT9lQH+MT06j3fK+6+lxnj7C7IvSSt92NY9iXlQqEU QCrQ== MIME-Version: 1.0 X-Received: by 10.220.114.135 with SMTP id e7mr15229136vcq.23.1395283008340; Wed, 19 Mar 2014 19:36:48 -0700 (PDT) Received: by 10.58.55.131 with HTTP; Wed, 19 Mar 2014 19:36:48 -0700 (PDT) In-Reply-To: <532A418A.8020607@sugarcrm.com> References: <532A3E88.20202@sugarcrm.com> <532A418A.8020607@sugarcrm.com> Date: Thu, 20 Mar 2014 10:36:48 +0800 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7b342d8a12ddec04f500a401 Subject: Re: [PHP-DEV] Merge PR 621 From: tjerk.meesters@gmail.com (Tjerk Meesters) --047d7b342d8a12ddec04f500a401 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Mar 20, 2014 at 9:16 AM, Stas Malyshev wrote: > Hi! > > > Yes, that's probably what it was supposed to do, but as you can see > > from bug 66834 that's clearly not the case. I had earlier approached > > the problem purely from SPL standpoint (see linked PR) but Etienne > > said that it would be a better idea to tackle this issue further up > > the chain so to speak :) > > I think we need to first find out why that code did not work, instead of > ripping out the code that already was supposed to do exactly what this > bug is saying and replacing it with other code. Here's my earlier work on this: https://github.com/php/php-src/pull/614 It currently "doesn't work" because isset()/empty() work like array_key_exists() on objects that extend ArrayObject, which is in some cases not the desired behaviour; see also: http://lxr.php.net/xref/PHP_5_6/ext/spl/spl_array.c#604 If 'offsetExists()' is not overridden, the logic is done correctly; see also: http://lxr.php.net/xref/PHP_5_6/ext/spl/spl_array.c#617 The behaviour is currently correct inside zend_std_has_dimension(), so making the fix in SPL alone (#614) would make performance "suffer" less unless offsetGet() is overridden. Personally I'm fine either way; like I said, my first patch was only done in SPL when Etienne suggested the approach in #621. > At least we need to know > the reason why that did not work. So please do not merge this patch > until we know what's going on there. > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > -- -- Tjerk --047d7b342d8a12ddec04f500a401--